STAT 360: Regression Analysis Handout #1: Univarate Analysis of the Response Variable Example 1.1: Consider the following study which investigated the effect of certain variables on the size of an impact crater. Response Variable: Diameter of impact crater (cm) Variables under investigation (i.e. independent variables): Height of which projectile was dropped Project type (glass, steel, or wood ball) Sand type (course, fine) Data from this experiment is provided on the course website. Before trying to understand the effect of the variables under investigation, we will begin with a complete statistical summary of the response variable. To obtain a complete summary of a variable in JMP, click Analyze > Distribution. Place the variable to be summarized in the Y, Columns box and click OK. 1 Provide a discussion of the following summary statistics: Mean: Standard Deviation: Median: The 2.5% and 97.5% quantile: A histogram simply provides a count of the number of observations within each bin. 2 One noted problem with histograms is the perception of the shape in the data is influenced by the number of bins and the bin width. The following choice for the number of bins and bin widths is misleading. JMP also allows certain distributions to be placed over the histogram. For example, if you believe the data follows a general normal shape, you can overlay a normal curve by selecting Continuous Fit > Normal. 3 The outcome is shown here. What is the best estimate for the mean of the normal curve? What is the best estimate for the standard deviation of the normal curve? A second commonly used option from the Continuous Fit menu is Smooth Curve. Comments: The smooth curve does not assume any particular form for the distribution of the data. 4 In JMP, the sensitivity of the fit is controlled by the Kernal Std slider. If the Kernal Std is larger (slide to the right), the curve becomes more flat and it is said that more smoothing is being done. It is possible to over smooth the data with the kernel smoother. Too much smoothing or over smoothing would be equivalent to creating a histogram with one bar. Likewise, it is possible to not do enough smoothing – i.e. under smooth. This would be analogous to creating way too many bins when constructing the histogram. 5 Understanding Kernal Smoothing http://en.wikipedia.org/wiki/Kernel_density_estimation 6 Back to our example with Diameter from Impact Crater study. Probability density histogram (i.e. area sums to 1) Histogram with data underneath (i.e. rug plot) 7 On the graph below, give a rough sketch of the kernel densities used in smoothing. What happens to the kernel densities when too much smoothing is done? 8 Comment: The benefit of using density smoothers can be seen here. The diameter of the impact crater is substantially larger for the Steel ball compared to the wood ball. 9 Inferential Methods: Understanding the difference between the Standard Deviation and the Standard Error for the Mean The variation in the sample mean (over repeated sampling) is significantly less than the original data. Understanding the 95% confidence interval for the mean. 10 Wiki entry for Confidence Interval … http://en.wikipedia.org/wiki/Confidence_interval Question: How do we know that (𝑥̅ −𝜇) 𝑆⁄ √𝑛 follows a t-distribution with df = (n-1)? First, how do we get a t-distribution? 11 Consider the following (well-known) distributional properties. 1. (𝑥̅ −𝜇) 𝜎 ⁄ 𝑛 √ has a normal distribution with mean = 0 and variance =1 (𝑛−1)𝑆 2 2. √( 𝜎2 ) has a chi-square distribution with df = (n-1). (𝑥̅ −𝜇) 𝑆⁄ √𝑛 The math to show that The math for the 95% confidence interval. follows a t-distribution with df = (n-1). 12