Homework 6

Table of Contents

Problem 1

Let XX represent the tire pressure of a Formula 1 car at its peak temperature, measured in PSI. With the current tires, it is known that XN(32,4)X \sim \mathcal{N}\p{32, 4}. A new brand of tire is being considered, hoping that the PSI at peak temperature will be higher than 3232, such that XN(μ>32,4)X \sim \mathcal{N}\p{\mu > 32, 4}. Suppose we collect a sample of size n=36n = 36 about the peak temperature PSI of the second brand of tires, and we observe x=35\mean{x} = 35. We are interested in testing the following hypotheses:

H0 ⁣:μ=32H1 ⁣:μ>32.\begin{aligned} H_0 &\colon \mu = 32 \\ H_1 &\colon \mu > 32. \end{aligned}
  1. Derive the pp-value for this test.
  2. Given α=0.05\alpha = 0.05, should we reject or not reject H0H_0?
Solution.

The test statistic for the scenario is

Z=Xμσ/nN(0,1),Z = \frac{\mean{X} - \mu}{\sigma/\sqrt{n}} \sim \mathcal{N}\p{0, 1},

since XX is normal and the variance is known. The sample test statistic (under H0H_0) is then

z=35322/36=9.z = \frac{35 - 32}{2/\sqrt{36}} = 9.
  1. The pp-value is the probability of observing x=35\mean{x} = 35 or something more extreme (i.e., numbers that give more evidence that μ>32\mu > 32). In this problem, this is

    P(Z9)0.\boxed{\P\p{Z \geq 9} \approx 0}.
  2. We reject H0H_0 at α=0.05\alpha = 0.05.

Problem 2

Among the data collected for the WHO air quality monitoring project is a measure of suspended particles, in μg/m3\mu g/m^3. Let XX and YY equal the concentration of suspended particles in μg/m3\mu g/m^3 in the city centers of Melbourne and Huston, respectively. Using nX=13n_X = 13 observations of XX and nY=16n_Y = 16 observations of YY, we shall test H0 ⁣:μX=μYH_0 \colon \mu_X = \mu_Y against H1 ⁣:μX<μYH_1 \colon \mu_X < \mu_Y.

  1. Define the test statistic and critical region, assuming that the variances are equal. Let α=0.05\alpha = 0.05.
  2. If x=72.9\mean{x} = 72.9, sX=25.6s_X = 25.6, y=81.7\mean{y} = 81.7, and sY=28.3s_Y = 28.3, calculate the value of the test statistic and state your conclusion.
Solution.
  1. Since the sample size is small and the variances are unknown but equal, the test statistic is

    T=XY(μXμY)Sp1nX+1nYt(nX+nY2),T = \frac{\mean{X} - \mean{Y} - \p{\mu_X - \mu_Y}}{S_p\sqrt{\frac{1}{n_X} + \frac{1}{n_Y}}} \sim t\p{n_X + n_Y - 2},

    where SpS_p is the pooled sample standard deviation. We have a one-sided test, so we reject if

    t<tα(27)=1.703.\boxed{t < -t_\alpha\p{27} = -1.703}.
  2. Under H0H_0, μXμY=0\mu_X - \mu_Y = 0, so the sample test statistic is

    t=72.981.7sp113+116=0.8686.t = \frac{72.9 - 81.7}{s_p\sqrt{\frac{1}{13} + \frac{1}{16}}} = -0.8686.

    This is not in the critical region, so we do not reject H0H_0 at α=0.05\alpha = 0.05.

Problem 3

Some nurses in county public health conducted a survey of women who had received inadequate prenatal care. They used information from birth certificates to select mothers for the survey. The mothers selected were divided into two groups:

  • Group AA: mothers who said they had 5\leq 5 prenatal visit.
  • Group BB: mothers who said they had 6\geq 6 prenatal visits.

Let XX be the birth weight of babies from mothers in Group AA and YY the birth weight of babies from mothers in Group BB. Assume that XN(μX,σX2)X \sim \mathcal{N}\p{\mu_X, \sigma_X^2} and YN(μY,σY2)Y \sim \mathcal{N}\p{\mu_Y, \sigma_Y^2}, where σX\sigma_X and σY\sigma_Y are unknown but equal. Suppose that the result of the survey is that

  • Birth weight of babies from mothers in Group AA: 4949, 108108, 110110, 8282, 9393, 114114, 134134, 114114, 9696, 5252, 101101, 114114, 120120, 116116
  • Birth weight of babies from mothers in Group BB: 133133, 108108, 9393, 119119, 119119, 9898, 106106, 131131, 8787, 153153, 116116, 129129, 9797, 110110
  1. Give a 95%95\% confidence interval for μXμY\mu_X − \mu_Y.
  2. Test H0 ⁣:μX=μYH_0 \colon \mu_X = \mu_Y against H1 ⁣:μXμYH_1 \colon \mu_X \neq \mu_Y at significance level 0.050.05.
  3. Compute the associated pp-value.
  4. Redo part (1)-(3), but do not assume σX=σY\sigma_X = \sigma_Y, by pairing up the mothers of the two groups in the order they appear.
Solution.

For parts (1)-(3), since the variances are assumed to be equal, the test statistic is

T=XY(μXμY)Sp1nX+1nYt(nX+nY2).T = \frac{\mean{X} - \mean{Y} - \p{\mu_X - \mu_Y}}{S_p\sqrt{\frac{1}{n_X} + \frac{1}{n_Y}}} \sim t\p{n_X + n_Y - 2}.
  1. A 95%95\% confidence interval is

    xy±tα2(26)sp1nX+1nY=[30.7909,2.7909]\mean{x} - \mean{y} \pm t_{\frac{\alpha}{2}}\p{26} s_p\sqrt{\frac{1}{n_X} + \frac{1}{n_Y}} = \boxed{\br{-30.7909, 2.7909}}
  2. Since this is a two-sided test, the critical region is

    t<tα2(26)=2.056ort>tα2(26)=2.056.t < -t_{\frac{\alpha}{2}}\p{26} = -2.056 \quad\text{or}\quad t > t_{\frac{\alpha}{2}}\p{26} = 2.056.

    In our case, the sample test statistic is

    t=1.7143,t = -1.7143,

    which is not in the critical region. Thus, we do not reject H0H_0 at α=0.05\alpha = 0.05.

  3. Since this is a two-sided test, the pp-value is

    P(Tt or Tt)=2P(Tt)=2(1P(Tt))=2(1P(T1.7143)).\begin{aligned} \P\p{T \leq -\abs{t} \text{ or } T \geq \abs{t}} &= 2\P\p{T \geq \abs{t}} \\ &= 2\p{1 - \P\p{T \leq \abs{t}}} \\ &= 2\p{1 - \P\p{T \leq 1.7143}}. \end{aligned}

    From the tt-table in the book,

    0.95<P(T1.7143)<0.975,0.95 < \P\p{T \leq 1.7143} < 0.975,

    so the pp-value satisfies

    0.05<p-value<0.10.\boxed{0.05 < p\text{-value} < 0.10}.
  4. What the problem asks you to do is to treat the samples as differences, e.g., d1=x1y1=49133d_1 = x_1 - y_1 = 49 - 133, etc. This gives us the following sample:

    d84017372616281791011515236\begin{array}{r|rrrrrrrrrrrrrr} d & -84 & 0 & 17 & -37 & -26 & 16 & 28 & -17 & 9 -101 & -15 & -15 & 23 & 6 \end{array}

    We need to test the hypotheses

    H0 ⁣:μD=0H1 ⁣:μD0.\begin{aligned} H_0 &\colon \mu_D = 0 \\ H_1 &\colon \mu_D \neq 0. \end{aligned}

    In this case, we have n=14n = 14 differences and the test statistic is now

    T=D(μXμY)SD/nt(13).T = \frac{\mean{D} - \p{\mu_X - \mu_Y}}{S_D/\sqrt{n}} \sim t\p{13}.

    A 95%95\% confidence interval is

    d±tα2(13)sDn=[36.2270,8.2270].\mean{d} \pm t_{\frac{\alpha}{2}}\p{13} \frac{s_D}{\sqrt{n}} = \boxed{\br{-36.2270, 8.2270}}.

    The critical region is

    t<tα2(13)=2.160ort>tα2(13)=2.160.t < -t_{\frac{\alpha}{2}}\p{13} = -2.160 \quad\text{or}\quad t > t_{\frac{\alpha}{2}}\p{13} = 2.160.

    The test statistic is

    t=1.3605,t = -1.3605,

    which does not fall into the critical region, so we do not reject H0H_0 at α=0.05\alpha = 0.05. Lastly, the pp-value is computed like before:

    p-value=2(1P(T1.3605)).p\text{-value} = 2\p{1 - \P\p{T \leq 1.3605}}.

    From the textbook's tt-table, 0.90<P(T1.3605)<0.950.90 < \P\p{T \leq 1.3605} < 0.95, so the pp-value satisfies

    0.10<p-value<0.20.\boxed{0.10 < p\text{-value} < 0.20}.

Problem 4

A stream was studied on 2626 days, half during dry weather (XX), and the other half immediately after a significant rainfall (YY). Assume that the distributions of XX and YY are N(μX,σ2)\mathcal{N}\p{\mu_X, \sigma^2} and N(μY,σ2)\mathcal{N}\p{\mu_Y, \sigma^2}, respectively. The following turbidities were recorded in units of NTUs (nephelometric turbidity units):

x2.914.91.012.69.4y7.84.22.412.917.3\begin{array}{r|rrrrr} x & 2.9 & 14.9 & 1.0 & 12.6 & 9.4 \\ y & 7.8 & 4.2 & 2.4 & 12.9 & 17.3 \end{array}

Test the null hypothesis H0 ⁣:μX=μYH_0 \colon \mu_X = \mu_Y against H1 ⁣:μX>μYH_1 \colon \mu_X > \mu_Y at α=0.01\alpha = 0.01. Give bounds for the pp-value and state your conclusion.

Solution.

Since the sample size is small and the variances are assumed to be equal, our test statistic is

T=XY(μXμY)Sp1nX+1nYt(8).T = \frac{\mean{X} - \mean{Y} - \p{\mu_X - \mu_Y}}{S_p\sqrt{\frac{1}{n_X} + \frac{1}{n_Y}}} \sim t\p{8}.

Our observed test statistic is

t=0.1970,t = -0.1970,

so the pp-value is

P(T0.1970)=1P(T0.1970).\P\p{T \geq -0.1970} = 1 - \P\p{T \leq 0.1970}.

From the tt-table, P(T0.1970)<0.60\P\p{T \leq 0.1970} < 0.60, so

p-value>0.40.\boxed{p\text{-value} > 0.40}.

Thus, we do not reject H0H_0 at α=0.01\alpha = 0.01.

Problem 5

Let YBin(100,p)Y \sim \operatorname{Bin}\p{100, p}. To test H0 ⁣:p=0.08H_0 \colon p = 0.08 against H1 ⁣:p<0.08H_1 \colon p < 0.08, we reject H0H_0 and accept H1H_1 if and only if Y6Y \leq 6. Determine the significance level α\alpha of the test.

Solution.

The significance level α\alpha is the probability that we reject H0H_0 given that H0H_0 is true. In other words,

α=P(Y6).\alpha = \P\p{Y \leq 6}.

We can use the normal approximation to a binomial distribution since n=100n = 100 is large:

Z=Y100pp(1p)/100N(0,1).Z = \frac{\frac{Y}{100} - p}{\sqrt{p\p{1 - p}/100}} \approx \mathcal{N}\p{0, 1}.

Then (with a continuity correction) we get

P(Y6)=P(Y6.5)P(Z6.51000.080.08(10.08)/100)P(Z0.5529)=1P(Z0.5529)10.7088=0.2912.\begin{aligned} \P\p{Y \leq 6} &= \P\p{Y \leq 6.5} \\ &\approx \P\p{Z \leq \frac{\frac{6.5}{100} - 0.08}{\sqrt{0.08\p{1 - 0.08}/100}}} \\ &\approx \P\p{Z \leq −0.5529} \\ &= 1 - \P\p{Z \leq 0.5529} \\ &\approx 1 - 0.7088 \\ &= \boxed{0.2912}. \end{aligned}

Alternatively, you can just calculate the binomial sum directly if your calculator is able to compute the binomial coefficients:

P(Y6)=k=06(100k)(0.08)k(0.92)100k=0.3032\P\p{Y \leq 6} = \sum_{k=0}^6 \binom{100}{k} \p{0.08}^k \p{0.92}^{100-k} = \boxed{0.3032}