One Sample Z and T tests

Question 02

From previous studies, you believe the population standard deviation is 2.0.

(a)

Step 1: Assumptions

Population: College-aged adults.

The comparison distribution will be a distribution of means.

The hypothesis test will be a z test because we have only one sample and we know the population mean and standard deviation.

Step 2: State the null and alternative hypotheses.

Hypotheses are always about populations, not samples!

Null hypothesis: Population mean number hours of sleep for college students is 8.

\[H_0: \mu = 8\]

Alternative hypothesis: Population mean number hours of sleep for college students is different from 8.

\[H_a: \mu \neq 8\]

Step 3: Determine the characteristics of the comparison distribution

For z tests, we must know the mean and the standard error of the population of scores

From Question 01, the sample mean is 8.2921.

And the standard deviation is:

\[\sigma_\bar{X} = \dfrac{\sigma}{\sqrt{n}} = \dfrac{2}{\sqrt{95}} = 0.2051957\]

Step 4: Determine the significance level

The exercise already did that for us.

\[\alpha = 0.05\]

Step 5: Calculate Test Statistic

\[z = \dfrac{\bar{x} - \mu}{\sigma_{\bar{X}}} = \dfrac{8.2921 - 8}{0.205195} = 1.42\]

Step 6.1: Conclude (Statiscal way)

Because this is a two-sided test (alternative hypothesis: not equal), p-value is going to be:

\[P(|Z| > 1.42) = 2 P( Z > 1.42)\]

pvalue

Therefore, p-value is:

## [1] 0.1556

So, p-value > 0.05. Therefore, we do not reject the null hypothesis.

Step 6.2: Conclude (English)

There is enough (or significant) evidence to conclude that the population mean number hours of sleep for college students is different from 8.

(b)

To construct the 95% confidence interval we need z so that

\[P(- z < Z < z) = .95\]

Hence, z = 1.96.

Therefore, using the equation:

\[\bar{x} \pm z \times \sigma_\bar{X} = 8.2921 \pm 1.96 \times 0.2051957\]

Ergo,

\[CI 95\% = [7.89, 8.694]\]

Question 03

From previous studies, you believe the population standard deviation is 2.0.

(a)

We do not know the population standard deviation. Therefore, we have to use a T test.

(b)

Step 1: Assumptions

Population: College-aged adults.

The comparison distribution will be a distribution of means.

The hypothesis test will be a t test because we have only one sample and we do not know the population standard deviation.

Step 2: State the null and alternative hypotheses.

Does not change from Question 02 a!

Hypotheses are always about populations, not samples!

Null hypothesis: Population mean number hours of sleep for college students is 8.

\[H_0: \mu = 8\]

Alternative hypothesis: Population mean number hours of sleep for college students is different from 8.

\[H_a: \mu \neq 8\]

Step 3: Determine the characteristics of the comparison distribution

From Question 01, the sample mean is 8.2921.

And the standard deviation now is:

\[s_\bar{X} = \dfrac{s}{\sqrt{n}} = \dfrac{1.66}{\sqrt{95}} = 0.1703124\].

Therefore, the

Step 4: Determine the significance level

Does not change from Question 02 a!

The exercise already did that for us.

\[\alpha = 0.05\]

Step 5: Calculate Test Statistic

\[t = \dfrac{\bar{x} - \mu}{s_{\bar{X}}} = \dfrac{8.2921 - 8}{0.1703124} = 1.715084\].

Step 6.1: Conclude (Statiscal way)

Because this is a two-sided test (alternative hypothesis: not equal), p-value is going to be:

\[P(|T| > 1.71) = 2 P( Z > 1.71)\]

With degrees of freedom = 95 - 1 = 94.

pvalue

Therefore, p-value is:

## [1] 0.09056

So, p-value > 0.05. Therefore, we do not reject the null hypothesis.

Step 6.2: Conclude (English)

There is enough (or significant) evidence to conclude that the population mean number hours of sleep for college students is different from 8.

Doing in SPSS: Output

pvalue

Same results!

(c)

To construct the 95% confidence interval we need t so that

\[P(- t < T < t) = .95\]

Hence, t = 1.99.

Therefore, using the equation:

\[\bar{x} \pm t \times s_\bar{X} = 8.2921 \pm 1.99 \times 0.1703124\]

Ergo,

\[CI 95\% = [7.95, 8.63].\]

Doing in SPSS: Output

pvalue

\[CI 95\% = [8 + (-0.0464), 8 + 0.6303] \approx [7.95, 8.63]\]