<<

Coverage of test 2

1. Inference — confidence and intervals

(a) confidence interval for µ, known σ (b) confidence interval for µ, unknown σ (c) prediction interval for future observation, unknown σ (d) confidence interval for Binomial p

2. Inference — hypothesis testing (a) null, alternative hypotheses (b) Type I and II errors (c) one and two tailed tests (d) statistical significance versus practical importance (e) µ, known σ (f) µ, unknown σ (g) paired samples, two-sample tests (h) Binomial p (i) two-sample Binomial comparison of probabilities

3. Regression (a) purposes of regression (b) assumptions (c) estimates; of estimate; R2 (d) hypothesis testing — t, F tests (e) confidence intervals, prediction intervals (f) checking assumptions (g) transformations — log/log, semilog models

Note: You should not view the list above as exhaustive. Everything that we have discussed in class, or is in the course supplement, is fair game to appear on the test.

Practice problems

(1) A research organization commissioned a study that surveyed Americans and asked them if they were worried about their finances. (a) Of the 324 people surveyed whose annual incomes were between $40,000 and $120,000 (defined as middle-income), 160 reported that they were worried about their financial condition. Construct an interval estimate at the 99% level for the true proportion of Americans whose incomes are in this that feel this way.

c 2020, Jeffrey S. Simonoff 1

(b) The survey also asked 304 people whose annual incomes were less than $40,000 (defined as low-income) this question, and 210 said that they were worried about their financial condition. Is the proportion of people who feel this way for the low-income people significantly different from the proportion who feel this way for the middle-income people? Carefully state the hypotheses that you are testing and the test that you are using.

(2) Air “tightness” refers to the characteristics of a home in terms of energy efficiency. While a “tight” home is obviously beneficial, it is in direct contrast to the “health” of a home, in the sense of providing an environmentally friendly, properly ventilated, home that is free from indoor pollutants. For this reason, it is of interest to try to understand the tightness of a home as a function of its characteristics, since it is difficult to measure tightness on a home-by-home basis. The following analysis is based on a sample of 66 homes in northern Louisiana (“Empirical Modeling of Air Tightness in Residential Homes in North Louisiana,” by J.J. Erinjeri, R. Nassar, M. Katz, and N.M. Witriol, Case Studies in Business, Industry and Government , 3, 37-47, 2009). The tightness of each home is measured using the CFM50, the airflow in cubic feet per minute through a blower door fan needed to create a change in building pressure of 50 pascals (normal atmospheric pressure at sea level corresponds to 101,325 pascals). The following output refers to a regression model fit with logged (base 10) CFM50 as the response variable, and the year the house was built (Year built), the living area of the house in square feet (Area), and the number of bedrooms in the house (NOB) as predictors.

Regression Analysis: Logged CFM50 versus Year built, Area, NOB

Analysis of

Source DF AdjSS AdjMS F-Value P-Value Regression 3 2.25330 0.75110 46.95 0.000 Year built 1 1.01058 1.01058 63.17 0.000 Area 1 1.05137 1.05137 65.72 0.000 NOB 1 0.01590 0.01590 0.99 0.323 Error 62 0.99179 0.01600 Total 65 3.24509

Model Summary

S R-sq R-sq(adj) R-sq(pred) 0.126478 69.44% 67.96% 64.80%

Coefficients

Term Coef SECoef T-Value P-Value VIF Constant 16.77 1.74 9.66 0.000 c 2020, Jeffrey S. Simonoff 2

Year built -0.007001 0.000881 -7.95 0.000 1.01 Area 0.000244 0.000030 8.11 0.000 1.18 NOB 0.0260 0.0260 1.00 0.323 1.18

Regression Equation

Logged CFM50 = 16.77 - 0.007001 Year built + 0.000244 Area + 0.0260 NOB

Settings

Variable Setting Year built 1990 Area 2000 NOB 3

Prediction

Fit SEFit 95%CI 95%PI 3.40032 0.0195390 (3.36127, 3.43938) (3.14450, 3.65615)

(a) Is the overall regression relationship statistically significant here? Carefully state the hypotheses that you are testing and the test that you are using. Use α = .05. (b) Do any of the individual predictors provide significant predictive power for the logged CFM50 value given the others? Carefully state the hypotheses that you are testing and the test(s) that you are using. Use α = .05. (c) What proportion of variability in logged CFM50 value is accounted for by the predictors? (d) What does the slope coefficient for the variable Year in terms of the rela- tionship between the year the house was built and the CFM50? Be as complete and specific as possible in answering this question exactly as it is stated. (e) A north Louisiana home buyer is considering purchasing a 2000 square foot three- bedroom home that was built in 1990. Provide her an exact interval estimate (at a 95% level) for the tightness level (in CFM50) of that house. (f) The display on the next page gives residual plots for this model fit. Are there any potential model violations that you can see in these plots? If so, what would you do to try to address them? Be as specific and complete as possible in your discussion.

c 2020, Jeffrey S. Simonoff 3

(3) The following is an excerpt from an article which appeared in The Independent Mag- azine, dated November 14, 1992:

A parapsychologist projected slides on to a screen in an adjacent soundproofed room. The slides were either blank rectangles or of a powerful emotionally affecting image. I had to tell through clairvoyance which type of slide — blank or affecting — was being shown on the screen in the next room. My score was 13 out of 24 ... this was enough to make me believe I had clairvoyant powers.

Do you agree with the author’s conclusion? That is, does this result provide sufficient evidence to reject the hypothesis that it could have occurred simply by random chance? Carefully state the hypotheses you are testing, and the test that you are using. Use α = .05.

(4) When the weather is reported for New York City we tend to think that the numbers given apply to the entire city, but that is of course not necessarily the case. Indeed, the National Weather Service has three different weather offices in New York City, at Central Park, LaGuardia Airport, and JFK Airport. Is weather the same at these different stations, or different? This can be investigated by looking at daily weather observations. The following output was obtained from Minitab related to this question. The consist of daily average relative humidity values (expressed as a percentage of the maximum possible humidity for that temperature) for each of the 365 days between December 1, 2016 and November 30, 2017, inclusive, for JFK Airport (JFK Ave Hum) and Central Park (CP Ave Hum), respectively (the daily average relative humidity is defined to be the average of the high relative humidity and the low relative humidity for that day).

c 2020, Jeffrey S. Simonoff 4

Two-Sample T-Test and CI: JFK Ave Hum, CP Ave Hum

Method

mu1: mean of JFK Ave Hum mu2: mean of CP Ave Hum Difference: mu1 - mu2

Equal are not assumed for this analysis.

Descriptive Statistics

Sample N Mean StDev SEMean JFK Ave Hum 365 68.0 15.2 0.79 CPAveHum 365 62.9 15.2 0.80

Estimation for Difference

95% CI for Difference Difference 5.08 (2.87, 7.29)

Test

Nullhypothesis H0:mu1-mu2 =0 H1: mu1 - mu2 not = 0

T-Value DF P-Value 4.52 727 0.000

c 2020, Jeffrey S. Simonoff 5

Paired T-Test and CI: JFK Ave Hum, CP Ave Hum

Descriptive Statistics

Sample N Mean StDev SEMean JFK Ave Hum 365 68.019 15.163 0.794 CP Ave Hum 365 62.940 15.209 0.796

Estimation for Paired Difference

95% CI for Mean StDev SE Mean mu_difference 5.079 7.950 0.416(4.261, 5.898)

mu_difference: mean of (JFK Ave Hum - CP Ave Hum)

Test

Null hypothesis H0: mu_difference = 0 Alternative hypothesis H1: mu_difference not = 0

T-Value P-Value 12.21 0.000

(a) Is the observed average JFK Airport average humidity significantly different from the observed average Central Park average humidity? Carefully state the hy- potheses that you are testing and the test(s) that you are using. Use α = .05.

c 2020, Jeffrey S. Simonoff 6

(b) What assumptions are you making in applying your test(s)? Do they seem valid here? What might you do to address any problems you might see?

(5) The 2002 paper “Comparative efficiency of insect repellents against mosquito bites,” by M.S. Franklin (New England Journal of Medicine, 347, 13–18) examined the efficacy of various insect repellents against mosquito bites. They applied repellents to the arms of 15 volunteers, which were then inserted into a cage with a fixed number of unfed mosquitoes. The elapsed time until the first bite was then recorded. One of the results of the study was that a 90% confidence interval for the expected elapsed time until the first bite when the product OFF! Deep Woods was applied was (283.8, 319.2), in minutes.

(a) Construct an interval estimate for the amount of time that a randomly selected person who applies the product to their arms can expect to pass before getting bitten under these conditions, such that the interval contains 99% of all such people. What assumption(s) are you making in constructing this interval? (b) The range of elapsed times until the first bite actually observed in the study was (200, 360). Based on this, do you think that the assumption(s) you made are valid?

c 2020, Jeffrey S. Simonoff 7

Answers to practice problems 1. (a) Let p be the true proportion of people worried about their financial condition. The confidence interval has the form

p zα/2 p(1 p)/n, ± p − or .494 (2.576) (.494)(.506)/324 = .494 .072 = (.422,.566). ± ± The exact interval is virtuallyp identical to this interval, which is not surprising given the large number of people on each side of the question.

(b) Let pM be the true proportion of the people who feel this way among middle- income people, and let pL be the true proportion of people who feel this way among low-income people. This is a two-sample binomial hypothesis testing question. The hypotheses being tested are

H0 : pM = pL versus H : p = p . a M 6 L We use the two–sample z–test p p z = | M − L| . p (1 p )/n + p (1 p )/n M − M M L − L L p Here pM = .494 and pL = .691, so .494 .691 z = | − | = 5.13. (.494)(.506)/324 + (.691)(.309)/304 This has p<.001, sop it is statistically significant at the usual α levels. That is, a significantly higher proportion of low-income people feel this way compared to middle-income people. 2. (a) We are testing the hypotheses

H0 : βYear built = βArea = βNOB = 0 versus Ha : at least one slope coefficient is not equal to 0. We use the F -test to test these hypotheses. Here it equals 46.95 and has p<.001, so we reject the null; that is, the overall regression is statistically significant. (b) We are testing the hypotheses H0 : βj = 0 versus H : β = 0, a j 6 for j = 1,..., 3. We use the t-test for each predictor to test this. In this case the tests for the slopes for Year built and Area are significant at a .05 level (in fact p<.001), while that for NOB is not.

c 2020, Jeffrey S. Simonoff 8

(c) This is given by R2 = 69.4%. You could have also reported the adjusted R2 of 68.0%. (d) This is an additive/multiplicative relationship: holding all else in the model fixed, a house being built one year later is associated with an estimated 1.6% decrease in CFM50 (multiplying CFM50 by 10−0.007001 = .984). That is, newer homes are apparently tighter. (e) We are looking for the exact prediction interval. We are given the interval for Logged CFM50, so the prediction interval for CFM50 is (103.1445, 103.6561), or (1394.8, 4530.0) feet3/minute. (f) Normality of residuals looks fine, other than the presence of two low outliers, houses where logged CFM50 is lower than expected. We should examine these houses more carefully, to see if they can provide any clues for factors that might be missing from the model. We should then omit them and refit the model to check to see if they have had a strong effect on the regression. There is a possible leverage point to the right in the residuals versus fitted values plot; it should be examined to try to understand it and see if its presence changes things in any material way. There is also some evidence of nonconstant variance in the plot of residuals versus fitted values, with the variability of the residuals being smaller for larger fitted values (this could be causing the perception of there being two outliers, in fact). We could explore the use of weighted least squares to address this (taking logs is unlikely to help matters, since that is effective when variability increases with the level of the response, not when it decreases, and in any event the response has already been logged).

3. Let p be the probability that the author will match the type of picture correctly. The hypotheses being tested are then 1 H : p = 0 2 versus 1 H : p = . a 6 2 The test to use is a one-sample binomial z-test, which has the form p p z = − 0 , p (1 p )/n 0 − 0 p where p = s/n, s is the number of successes in n binomial trials, and p0 is the hypoth- esized value of p under the null hypothesis. Here p = 13/24 = .542, so .542 .5 z = − = .41. (.5)(.5)/24 p This is obviously not close to being greater than the critical value of z.025 = 1.96; that is, the result does not provide any evidence that the author actually has clairvoyant powers. FYI, to calculate the tail probability for this test we would need to calculate P ( Z > .41), where Z follows a standard . The normal table | | c 2020, Jeffrey S. Simonoff 9

provides the result of .682. We’re assuming here that the normal approximation to the binomial is valid, which might be questionable given the relatively small number of trials. The results from Minitab show, however, that the conclusion stays the same even without the assumption:

Test and for One Proportion

Test of p = 0.5 vs p not = 0.5

Exact Sample X N Samplep 95.0%CI P-Value 1 13 24 0.541667 (0.328208,0.744470) 0.839

4. (a) This is a paired samples problem (there is one sample of dates, with two variables [JFK Airport average humidity and Central Park average humidity] being mea- sured on each date), so the output related to two-sample tests is irrelevant. The hypotheses being tested are

H0 : µJFK Ave Hum = µCP Ave Hum

versus H : µ = µ , a JFK Ave Hum 6 CP Ave Hum where µ corresponds to the average of the daily average humidity values. The test is the paired-samples t-test, which equals 12.21 (p<.001). Thus, we strongly reject H0; there is strong evidence that the average of the JFK Airport average humidities is greater than that for Central Park, a difference estimated at 5.1 percentage points of relative humidity. Since JFK Airport is located on Jamaica Bay, roughly three miles from the Atlantic Ocean, this is not at all surprising. (b) We are assuming that the sample of differences between Central Park and JFK Airport humidities can be viewed as a random sample from a population that is at least roughly normally distributed, but the of differences is no- ticeably right-skewed (although not overwhelmingly so). We might instead look at differences of logged humidity values (note that we cannot log the differences, since they are both positive and negative), but since average humidities them- selves are not right-skewed (as the normal plots demonstrate) this is unlikely to be very helpful (in fact the differences of logged humidities turns out to be even more right-skewed). That would, however, change the question, since we would now be testing if the of the differences was equal to zero. A better approach would be to consider a nonparametric test like the or the signed-rank test instead of the t-test (although those would also no longer be testing whether the mean of the differences was zero). Those tests provide strong evidence to reject the null hypothesis. We also need to be aware that these data c 2020, Jeffrey S. Simonoff 10

form a , and as such the assumption of independence from day to day that underlies a random sample might not be valid (that is, of the differences could be a problem). Indeed, given how weather systems can linger for several days this is highly questionable.

5. (a) We are given that X t(14)s/√15 = (283.8, 319.2) ± .05 (this is the equation for a 90% confidence interval). The t critical value used here is 1.76, and X must equal 301.5 (the center of the confidence interval); that is, the interval takes the form 301.5 17.7. The only thing we still need is s, and we get that by solving the equation± 1.76s/√15 = 17.7 for s; √15 = 3.87, so solving for s ultimately gives s = 38.9. Now, we can answer the question, which is to construct a 99% prediction interval:

1 X t(14)s 1+ = 301.5 (2.98)(38.9)(1.033) ± .005 r 15 ± = 301.5 119.7 ± = (181.8, 421.2)

We are assuming that the elapsed times can be viewed as a random sample from a normally distributed . (b) The observed range of the data should be reasonably similar to the 99% prediction interval, but we see that this is not really the case. In particular, the data appear to be a bit short-tailed, especially in the upper tail (note that the largest value is only about 1.5 standard deviations above the sample mean). Note that even with that short tail one person had their arm in the cage for 6 hours! Sounds like fun, doesn’t it?

c 2020, Jeffrey S. Simonoff 11