<<

Stat 139 Homework 3 Solutions, Spring 2015

2 2 Problem 1. Let Xi ∼ N(µX , σ ) for i = 1, . . . , nX , and Yj ∼ N(µY , σ ) for j = 1, . . . , nY . Also, assume that all observations are independent from each other. In Unit 4, we learned that the common population variance, σ2, can be estimated using a pooled sample variance:

2 2 2 (nX − 1)SX + (nY − 1)SY Sp = , nX + nY − 2 2 2 where SX and SY are the corresponding sample-specific variances. (a) If X¯ and Y¯ are sample means of each sample, show that  1 1  Var(X¯ − Y¯ ) = σ2 + . nX nY Solution: Due to the fact that the X’s and Y ’s are independent of one another, and independent within each type:

Var(X¯ − Y¯ ) = Var(X¯) + Var(Y¯ )  1   1  = Var (X1 + ... + XnX ) + Var (Y1 + ... + YnY ) nX nY  1   1  = 2 Var(X1 + ... + XnX ) + 2 Var(Y1 + ... + YnY ) nX nY  1   1  = 2 [Var(X1) + ... + Var(XnX )] + 2 [Var(Y1) + ... + Var(YnY )] nX nY     1  2 2 1  2 2 = 2 σ + ... + σ + 2 σ + ... + σ nX nY         1  2 1  2 1 2 1 2 = 2 nX σ + 2 nY σ = σ + σ nX nY nX nY  1 1  = σ2 + nX nY 2 2 2 (b) Show that Sp is an unbiased estimator of σ . Hint: Use the definition of Sp and the linearity of expectation. Solution:  2 2  2 (nX − 1)SX + (nY − 1)SY nX − 1 2  nY − 1 2  E Sp = E = E SX + E SY nX + nY − 2 nX + nY − 2 nX + nY − 2 n − 1 n − 1 (n X1) + (n − 1) = X σ2 + Y σ2 = Y Y σ2 = σ2 nX + nY − 2 nX + nY − 2 nX + nY − 2 2 (c) Using the definition of χn distribution by representation (sum of independent squared standard Normals) and the fact that sample-specific sample variances have the following sampling distributions: σ2 σ2 S2 ∼ χ2 ,S2 ∼ χ2 , X nX −1 Y nY −1 nX − 1 nY − 1 show that σ2 S2 ∼ χ2 . p nX +nY −2 nX + nY − 2

1 Solution:

2 2     2 (nX − 1)SX + (nY − 1)SY nX − 1 2 nY − 1 2 Sp = = SX + SY nX + nY − 2 nX + nY − 2 nX + nY − 2  n − 1  σ2  n − 1  σ2 ∼ X χ2 + Y χ2 nX −1 nY −1 nX + nY − 2 nX − 1 nX + nY − 2 nY − 1  σ2   σ2  = χ2 + χ2 nX −1 nY −1 nX + nY − 2 nX + nY − 2  σ2  = χ2 + χ2  nX −1 nY −1 nX + nY − 2  σ2  = χ2 nX +nY −2 nX + nY − 2

We were able to combine the two separate χ2 distributions into one becuase they were independent, and so the squared standard Normals they are comprised of are independent, and thus we have a sum of n + n − 2 independent standard Normal r.v.s squared, which is the definition of a χ2 r.v. X Y nX +nY −2

(d) Derive the sampling distribution of the following statistic (using representation),

X¯ − µ √ X . Sp/ nX Later we will learn that this statistic may be used in a one-sample test if two or more groups are observed, but only one of them is of interest. Solution:

¯ ¯ X−√µX X−√µX X¯ − µ (X¯ − µ )/σ σ/ n σ/ n √ X = √X = X = X S / n S /(σ) n q S2 r 2 p X p X p Sp(nX +nY −2) σ2 2 σ (nX +nY −2) Z ∼ ∼ T q nX +nY −2 χ2 /(n + n − 2) nX +nY −2 X Y

The definition of a T r.v. is a standard Normal r.v. dividied by the square root of an independent χ2 r.v. (divided by its degrees of freedom), and thus the result is a T r.v. with the same number of degrees of freedom as the χ2 r.v.

Problem 2. Using the “BOSsnowfall.csv” data from problem HW #2: (a) Conduct an appropriate t-test using α = 0.05 to determine whether totalsnow differs between winters where the temperature was at or below the 3rd quartile vs. above the 3rd quartile (without transforming totalsnow). Please use R to make your life easy. Solution: Here are the results of the unpooled 2-sample t-test in R:

> t.test(totalsnow.high,totalsnow.low)

2 Welch Two Sample t-test data: totalsnow.high and totalsnow.low t = -2.2397, df = 46.072, p-value = 0.02998 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -18.23868 -0.97321 sample estimates: mean of x mean of y 35.40435 45.01029

H0 : µ1 = µ2 vs. HA : µ1 6= µ2 T = −2.240 p − value = 0.02998 Since our estimated p-value = 0.02998 which is two-sided, is less than α = 0.05, we have enough evidence to conclude that the true average amount of snowfall is different in warmer winters (upper quartile) than in other winters.

(b) Compare your results to that of the permutation test from HW #2. Did you come to the same conclusion? Why or why not? Solution: The conclusion to the tests are the same: we reject the null hypothesis and see evidence of a difference in the means in these two groups. But the p-values are slightly different (it was about 0.043 from the permutation test). This is likely due to the sampling distribution of the t-test statistic may not be truly t-distributed (since the assumptions may be violated...most notably, these data are right-skewed). Due to this fact, one should trust the results of the permutation test over the t-test. [Also note: the p-value from the permutation test was random from a simulated reference distribution, so that could be the reason for a slightly different p-value].

Problem 3. Does it matter what kind of a golfer places the on? The company that manu- factures “Stinger” claims that the small head of their tee will lessen resistance and reduce spin, which should allow the ball to travel farther. They conducted a study that compared the distance traveled by hit off regular wooden tees to those hit off Stinger tees. Identical balls were struck by the same using a robotic device set to swing the club head at 95 miles per hour. The study results are shown below.

Sample Size Average (yards) SD (yards) Stinger Tees 10 241 9 Regular Tees 10 227 15

(a) Is there a difference in average ball flight between these two types of golf tees? Conduct an appropriate t-test using α = 0.05. Solution: H0 : µ1 = µ2 vs. HA : µ1 6= µ2

3 (X¯ − X¯ ) − (µ − µ ) (241 − 227) − 0 T = 1 2 1 2 = ≈ 2.531 q S2 S2 q 2 2 1 + 2 9 + 15 n1 n2 10 10 p − value ≈ 0.0322 Since our estimated p-value = 0.0322, which is two-sided, is less than α = 0.05, we have enough evidence to conclude that the true average driving distance is different off the two tees. If the order of which tee was struck off of first was randomly assigned, then a causal relationship seems plausible. This may generalize to robots (though technically it may not since it was not a random sample of robots or a random sample of golf balls), but certainly may not generalize to humans and all types of golf balls.

(b) Provide justification for the selection of which t-test you decided to use in part (a). Solution: The unpooled test was chosen since the ratio of variances was greater than 2: 152/92 ≈ 2.778.

(c) Calculate a 95% confidence interval for the difference in average ball flight distances between these two types of golf tees. Solution: s 2 2 r 2 2 ¯ ¯ ∗ S1 S2 9 15 (X1 − X2) ± tdf=9 + = (241 − 227) ± 2.262 + = (1.49, 26.51) n1 n2 10 10

(d) How is the test of hypotheses result in part (a) consistent with the interval in part (c)? Solution: The confidence interval and hypothesis test are consistent since the confidence interval does not contain the value zero for a plausible differece in population means (µ1 − µ2), and the hypothesis test rejected a null value difference of zero as well.

Problem 4. The same company decided to also run the experiment on human subjects. Each person was asked to strike (“”) a off of the Stinger tee and also off a regular tee, with the order decided by a coin flip. Results from the 25 individuals are shown below:

Sample Size Average (yards) SD (yards) Stinger Tees 25 209.2 34 Regular Tees 25 204.8 32 Difference 25 4.4 20

(a) Is there a difference in average ball flight between these two types of golf tees based on this experiment? Conduct an appropriate t-test using α = 0.05. Solution: H0 : µdiff = 0 vs. HA : µdiff 6= 0 X¯ − 0 4.4 − 0 T = diff = = 1.1 √S1 √20 n1 25 p − value ≈ 0.282

4 Since our estimated p-value = 0.282, which is two-sided, is great than α = 0.05, we do not have enough evidence to conclude that the true average driving distance is different off the two teesL the two types of tees may truly lead to the same distance in ball flights when humans hit off them.

(b) Calculate a 95% confidence interval for the difference in average ball flight distances between these two types of golf tees for this experiment. Solution: ¯ ∗ S1 20 Xdiff ± tdf=24 √ = 4.4 ± 2.064√ = (−3.86, 12.66) n1 25 (c) Based on the results in problems 2 and 3, write a one-paragraph summary (3-5 sentences) describing the results of the statistical analyses performed in determining whether Stinger tees really do affect the distance a golf ball travels. Please write in terms that someone who may have taken a statistics class a few years ago can understand. Solution: In #2, we found a significant difference in the average ball flight distances of Stinger tees compared to regular tees, based on tests by an automated machine. In #3, we found no significant difference in the average differences, based on tests by human subjects. The two analyses may differ for various reasons. The automated machine is more precise than the humans (smaller SD), since its swing should be nearly equivalent every time. Each person only got one swing on each tee, so there could be a lot of random noise in their measurements that decreases the ability of the hypothesis test to discern any differences in ball flight distance. Humans also might inherently swing differently from the machine, meaning that the increased flight distance using the machine may not be applicable for human players whatsoever.

5