Solved: Xavier Jiménez Albán

Last Update: 2024-11-19 13:15:06

Problem 1

The general population scores an average of \(\mu_0=80\) with a standard deviation of \(\sigma = 4.5\) on a memory test. A researcher conducts an experiment with 40 alcoholics. She believes the alcoholics will score lower on the average on the memory test. Is this test a one-sided or two-sided test?

Solution

This is a one-sided test.

Problem 2

A test to measure anxiety and depression has a mean score of \(\mu_0 = 55\) with a standard deviation equal to 3.5 for the general population. A group of 45 persons known to be suffering from anxiety and depression is given the test. It is of interest to know if the group will score differently than the general population on the test. Is this a one-sided or two-sided test?

Solution

This is a two sided test.

Problem 3

Rats are known to take a mean of 10 minutes to find their way through a maze to reach a food source with a standard deviation equal to 2.5 minutes. A researcher wishes to determine if taking a certain drug will change the time it takes to run the maze. Fifty rats are given the drug and timed on their run times through the maze. Is this a one-sided or two-sided test?

Solution

This is a two sided test.

Problem 4

A psychological researcher would like to evaluate a new approach to teaching statistics for the behavioral sciences. She knows that the average score that has been attained in this course over the past several years is 75 with \(\sigma = 7\). She uses the new approach on a sample of 75 to see if they score differently. Should she conduct a one-side or two-sided test to find the answer?

Solution

She should conduct a two-sided test.

Problem 5

State the null hypothesis and the alternative hypothesis in Problem 1.

Solution

Let \(\mu\) represent the average score on the memory tests for alcoholics.

\[H_0: \mu = \mu_0 \qquad H_1: \mu < \mu_0\] \[H_0: \mu = 80 \qquad H_1: \mu < 80\]

Problem 6

State the null hypothesis and the alternative hypothesis in Problem 2.

Solution

Let \(\mu\) represent the average score on anxiety and depression test for the group known to be suffering from depression anxiety

\[H_0: \mu = \mu_0 \qquad H_1: \mu \neq \mu_0\] \[H_0: \mu = 55 \qquad H_1: \mu \neq 55\]

Problem 7

State the null hypothesis and the alternative hypothesis in Problem 3.

Solution

\[H_0: \mu = \mu_0 \qquad H_1: \mu \neq \mu_0\] \[H_0: \mu = 10 \qquad H_1: \mu \neq 10\]

Problem 8

State the null hypothesis and the alternative hypothesis in Problem 4.

Solution

\[H_0: \mu = \mu_0 \qquad H_1: \mu \neq \mu_0\] \[H_0: \mu = 75 \qquad H_1: \mu \neq 75\]

Problem 9

Refer to Problems 1 and 5. Suppose the mean of the sample of 40 memory test scores for the 40 alcoholics is \(M = 78.4\). Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 80 \qquad H_1: \mu < 80 \qquad Z = \frac{M-\mu_0}{\frac{\sigma}{\sqrt{n}}} =\frac{78.4-80}{\frac{4.5}{\sqrt{40}}} = -2.25\]

The p-value is the area under the standard normal curve to the left of -2.25. Using R, we find \(z\):

(z <- qnorm(pnorm(q = 78.4, mean = 80, sd = 4.5 / sqrt(40))))
## [1] -2.248731

Therefore,

pnorm(q = z, mean = 0, sd = 1) # p-value
## [1] 0.01226481

The line qnorm(pnorm(...)) illustrates the process of converting a value to its cumulative probability and then converting that probability back to the original value. This demonstrates the relationship between values and probabilities in a normal distribution, enhancing the understanding of these fundamental statistical concepts.

The above is equivalent to:

pnorm(q = 78.4, mean = 80, sd = 4.5 / sqrt(40)) # p-value
## [1] 0.01226481

The p-value for this hypothesis test is \(0.0122\), which is less than \(\alpha = 0.05\) and we therefore reject the null hypothesis.

Problem 10

Refer to Problems 2 and 6. Suppose the mean of the sample of 45 depression and anxiety test scores for the 45 known anxiety and depression sufferers is \(M = 56.1\). Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 55 \qquad H_1: \mu \neq 55 \qquad Z = \frac{M-\mu_0}{\frac{\sigma}{\sqrt{n}}} =\frac{56.1-55}{\frac{3.5}{\sqrt{45}}} = 2.11\]

The p-value is the area under the standard normal curve to the left of -2.11 plus the area of the right of 2.11. We may find the area to the left of -2.11 and double it to find the p-value.

(z <- (56.1 - 55) / (3.5 / sqrt(45)))
## [1] 2.108293

Therefore,

2 * pnorm(q = -z, mean = 0, sd = 1)
## [1] 0.03500568

This is equivalent to:

2 * pnorm(q = 56.1, mean = 55, sd = 3.5 / sqrt(45), lower.tail = FALSE)
## [1] 0.03500568

Remember, we find the area in two tails to find the p-value because it is a two-tailed test. The p-value for this hypothesis test is 0.0349, which is less than \(\alpha= 0.05\), and we therefore reject the null hypothesis.

Problem 11

Refer to Problems 3 and 7. Suppose the mean of the sample of run times for the 50 rats taking the drug is \(M = 10.5\) minutes. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 10 \qquad H_1: \mu \neq 10 \qquad Z = \frac{M -\mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{10.5 -10}{\frac{2.5}{\sqrt{50}}} = 1.41\]

The p-value is the area to the left of -1.41 plus the area to the right of 1.41

z <- (10.5 -10) / (2.5 / sqrt(50))
z
## [1] 1.414214

\(Z\)-value is equivalent to

z <- qnorm(pnorm(q = 10.5, mean = 10, sd = 2.5 / sqrt(50)))
z
## [1] 1.414214

Therefore,

2 * pnorm(q = -z, mean = 0, sd = 1)
## [1] 0.1572992

Or directly,

2 * pnorm(q = 10.5, mean = 10, sd = 2.5 / sqrt(50), lower.tail = FALSE)
## [1] 0.1572992

Because the p-value is greater than 0.05 we do not have enough evidence to reject the null hypothesis.

Problem 12

Refer to Problems 4 and 8.Suppose the average score on the test in behavioral statistics for the sample is 77.5. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 75 \qquad H_1: \mu \neq 75 \qquad Z = \frac{M-\mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{77.5-75}{\frac{7}{\sqrt{75}}} = 3.09\]

The p-value is equal to area to the left of -3.09 plus the area to the right of 3.09.

In R this is equivalent to:

z <- qnorm(pnorm(q = 77.5, mean = 75, sd = 7 / sqrt(75)))
z
## [1] 3.092948

Therefore,

pnorm(q = -z, mean = 0, sd = 1) + 
  pnorm(q = z, mean = 0, sd = 1, lower.tail = F)
## [1] 0.001981789

Directly:

2 * pnorm(q = 77.5, mean = 75, sd = 7 / sqrt(75), lower.tail = FALSE)
## [1] 0.001981789

The p-value is \(2(0.001) = 0.002\). The new method gives better scores on the average.

Problem 13

In Problem 9, describe a type 1 and a type 2 error.

Solution

A type 1 error occurs if it is concluded that \(\mu < 80\) when \(\mu = 80\).

A type 2 error occurs if it is concluded that \(\mu = 80\) when \(\mu < 80\).

Problem 14

In problem 10, describe a type 1 and a type 2 error.

Solution

A type 1 error occurs if the sample evidence leads us to conclude that \(\mu \neq 55\), when \(\mu = 55\).

A type 2 error occurs if the sample evidence leads us to conclude that \(\mu = 55\), when \(\mu \neq 55\).

Problem 15

In problem 11, describe a type 1 and a type 2 error.

Solution

A type 1 error occurs if it is concluded that \(\mu \neq 10\) when \(\mu = 10\).

A type 2 error occurs if it is concluded that \(\mu = 10\) when \(\mu \neq 10\).

Problem 16

In problem 12, describe a type 1 and a type 2 error.

Solution

A type 1 error occurs if it is concluded that \(\mu \neq 75\) when \(\mu = 75\).

A type 2 error occurs if it is concluded that \(\mu = 75\) when \(\mu \neq 75\).

Problem 17

After working your way through Problems 1, 5, 9, and 13, put your z-test together as a complete test of hypotheses.

Solution

  1. Let \(\mu\) represent the average score on the memory test for alcoholics.

    \(H_0: \mu = 80\) The average score on the memory test for alcoholics equals 80, the same as the general population.

    \(H_1: \mu < 80\) The average score on the memory test for alcoholics is less than 80, the average score for the general population.

  2. \(\alpha\) is set equal to 0.05.

  3. Forty alcoholics are administered the memory test and the sample mean, \(M\), is found to equal 78.4.

  4. The value of the test statisticis is \(Z = \frac{78.4-80}{\frac{4.5}{\sqrt{40}}} = -2.25\)

We reject null hypothesis because \(Z=-2.25\) is less than \(-1.65\):

qnorm(0.05)
## [1] -1.644854
  1. The p-value, the area under the standard normal curve to the left of -2.25, is 0.0122. Because the p-value is less than \(\alpha\), reject the null hypothesis and conclude that alcohol reduces the score made on the memory test.
pnorm(q = 78.4, mean = 80, sd = 4.5 / sqrt(40)) # p-value
## [1] 0.01226481

Problem 18

After working your way through Problems 1 to 16, put your z-test together as a complete test of hypotheses for Problems 1 through 4.

Solution

  1. Let \(\mu\) represent the average score on the anxiety and depression test for the group known to be suffering from depression and axiety.

    \(H_0: \mu = 55 \quad\) The average made on the test given to the group known to be suffering from depression and anxiety is 55, the same as it is for the general population.

    \(H_0: \mu \neq 55 \quad\) The average made on the test given to the group known to be suffering from depression and anxiety is not 55, the value it is for the general population.

  2. \(\alpha\) is set equal to 0.05.

  3. Forty-five subjects known to be suffering from anxiety and depression are administered the test for anxiety and depression and the sample mean for that group is \(M = 56.1\).

  4. The value of the test statisticis is \(Z = \frac{56.1-55}{\frac{3.5}{\sqrt{45}}} = 2.11\)

At this point we reject null hypothesis if \(z\) is not between than

c(qnorm(0.05/2), qnorm((1 - 0.95) /2, lower.tail = FALSE))
## [1] -1.959964  1.959964
  1. The p-value is the area under the standard normal curve to the left of -2.11 plus the area to the right of 2.11 or 0.0349. Because the p-value is less than \(\alpha\), we reject the null and conclude that the group suffering from anxiety and depression score higher on the test than the general population.
2 * pnorm(q = 56.1, mean = 55, sd = 3.5 / sqrt(45), lower.tail = FALSE)
## [1] 0.03500568

Problem 19

After working your way through Problems 1 to 16, put your z-test together as a complete test of hypotheses for Problems 1 through 4.

Solution

  1. Let \(\mu\) represent the average time to run the maze when under the influence of the drug.

    \(H_0: \mu = 10\) The average time to run the maze when under the influence of the drug is the 10 minutes, the same as when not under the influence of the drug.

    \(H1: \mu \neq 10\) The average time to run the maze when under the influence of the drug is not 10 minutes, which is the time when not under the influence of the drug.

  2. \(\alpha\) is set equal to 0.05.

  3. Fifty rats are given the drug and timed when running the maze. The average time to run the maze when under the influence is 10.5 minutes.

  4. The value of the test statisticis is \(Z = \frac{10.5-10}{\frac{2.5}{\sqrt{50}}} = 1.41\)

At this point we cannot reject null hypothesis, because \(z\) is between:

c(qnorm(0.05/2), qnorm(1 - 0.05/2))
## [1] -1.959964  1.959964
  1. The p-value is the area under the standard normal curve to the left of -1.41 plus the area under the standard normal curve to the right of 1.41. The p-value is 0.1585. Because the p-value is greater than \(\alpha\), we do not reject the null.
2 * pnorm(q = 10.5, mean = 10, sd = 2.5 / sqrt(50), lower.tail = FALSE)
## [1] 0.1572992

Problem 20

After working your way through Problems 1 to 16, put your z-test together as a complete test of hypotheses for Problems 1 through 4.

Solution

  1. Let \(\mu\) represent the average grade made when teaching statistics for the behavioral sciences using the new approach.

    \(H_0: \mu = 75\) The new approach produces the same average results as the old technique.

    \(H_1: \mu \neq 75\) The new approach produces the different average results as the old technique.

  2. \(\alpha\) is set equal to 0.05.

  3. Seventy-five students are taught using the new approach. The average score made by this sample of 75 using using the new approach is \(M=77.5\)

  4. The value of test statistic is \(Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}}=\frac{77.5 - 75}{\frac{7.0}{\sqrt{75}}} = 3.09\)

At this point we reject null hypothesis if \(z\) is not between than

c(qnorm(0.05/2), qnorm(1-0.05/2))
## [1] -1.959964  1.959964
  1. The p-value is the area under the standard normal curve to the left of -3.09 plus the area under the standard normal curve to the right of 3.09. The p-value is 0.002. Because the p-value is less than \(\alpha\), we conclude the new approach produces different results than the old approach.
2 * pnorm(q = 77.5, mean = 75, sd = 7 / sqrt(75), lower.tail = FALSE)
## [1] 0.001981789

In Problems 21 through 24, the hypotheses in Problems 1 through 4 are tested when the data are in raw form rather than summarized form. This is the situation most often encountered in actual research studies.

Problem 21

Table below contains the test scores made on the memory test for 40 alcoholics. Test that the mean of these scores are less than 80, the average score for the general population.

Memory Test Scores for 40 Alcoholics
66 79 76 77
75 70 80 69
67 67 67 70
85 75 75 87
81 72 79 75
81 75 76 75
72 74 69 70
73 80 76 70
72 78 75 81
75 77 80 71

Solution

The R output follows. The standard deviation is assumed to be 4.5, the value of \(M\) computed from the data is 74.8, the computed test statistic is z = -7.31, and the p-value is 0.000. The null hypothesis is rejected.

BSDA::z.test(x = sample, sigma.x = 4.5, mu=80, alternative = "less")
## 
##  One-sample z-Test
## 
## data:  sample
## z = -7.3084, p-value = 1.352e-13
## alternative hypothesis: true mean is less than 80
## 95 percent confidence interval:
##        NA 75.97033
## sample estimates:
## mean of x 
##      74.8

The BSDA::z.test function in R conducts a one-sample z-test assuming the population standard deviation (\(\sigma\)) is known. The function takes several arguments: x = sample specifies the sample data, sigma.x = 4.5 is the known population standard deviation, mu = 80 is the population mean under the null hypothesis, and alternative = "less" indicates a one-sided test where the alternative hypothesis is that the sample mean is less than the population mean (\(\mu < 80\)). The function calculates the z-statistic and the p-value, determining whether the observed sample mean is significantly lower than the population mean.

The result of the one-sample z-test provides several key pieces of information. The calculated z-statistic is -7.3084, indicating that the sample mean is significantly lower than the population mean of 80 under the null hypothesis (The sample mean (74.8) is 7.3084 standard deviations below the expected population mean (80).) The p-value is extremely small (1.352e-13), meaning the probability of observing a sample mean as low as 74.8 or lower, if the true population mean were 80, is virtually zero. The alternative hypothesis states that the true mean is less than 80. The 95 percent confidence interval for the population mean is [NA, 75.97033], indicating that the lower bound cannot be calculated due to the one-sided nature of the test. Finally, the sample mean is 74.8. These results provide strong evidence to reject the null hypothesis and accept that the true mean is indeed less than 80.

Problem 22

Table below contains the test scores made on the anxiety and depression test given to 45 individuals suffering from anxiety and depression. Test that the average of these scores is not equal to 55, the average score for the general population. (See problem 2)

Test Scores for Anxiety and Depression Sufferers
55 55 55 60 50
50 54 57 51 62
57 59 57 60 59
59 49 63 50 58
58 54 56 56 54
61 57 58 52 54
60 55 55 59 60
50 57 54 61 51
59 55 56 59 54

Solution

The R output follows. The standard deviation is assumed to be 3.5, the value of M computed from the data is 56.111, the computed test statistic is z = 2.13, and the p-value is 0.033. The null hypothesis is rejected.

BSDA::z.test(x = p_8_22, sigma.x = 3.5, mu = 55, alternative = "two.sided")
## 
##  One-sample z-Test
## 
## data:  p_8_22
## z = 2.1296, p-value = 0.03321
## alternative hypothesis: true mean is not equal to 55
## 95 percent confidence interval:
##  55.08850 57.13372
## sample estimates:
## mean of x 
##  56.11111

Problem 23

Table below contains the run times for 50 rats when under the influence of a drug. Test that the average run time is different than 10 minutes for the 50 rats. See problem 3.

Times to Run the Maze when under the Influence of the Drug
16.2 13.6 6.1 9.9 6.8
9.5 11.8 15.6 9.4 14.2
8.3 9.9 15.3 11.3 3.6
11.1 8.8 10.1 12.1 10.1
10.6 9.2 6.8 8.8 12.0
11.0 9.1 11.6 12.7 10.9
8.7 10.7 14.7 9.0 13.2
11.5 8.5 9.5 9.9 9.2
2.3 11.4 10.0 14.5 12.9
11.1 7.7 14.4 9.4 10.3

Solution

The R output follows. The standard deviation is assumed to be 2.5, the value of M computed from the data is 10.506, the computed test statistic is z = 1.43, and the p-value is 0.152. The null hypothesis is not rejected.

BSDA::z.test(x = p_8_23, sigma.x = 2.5, mu = 10, alternative = "two.sided" )
## 
##  One-sample z-Test
## 
## data:  p_8_23
## z = 1.4312, p-value = 0.1524
## alternative hypothesis: true mean is not equal to 10
## 95 percent confidence interval:
##   9.813048 11.198952
## sample estimates:
## mean of x 
##    10.506

Problem 24

Table below contains the test scores for 75 students in statistics for the behavioral sciences when taught using the new technique. Test that the average test score is different than 75, the average when the course is taught using the traditional method. See problem 4

Test Scores when Using the New Technique to Teach Statistics
67 74 67 77 76
73 72 80 77 73
67 73 73 75 85
77 79 80 79 74
75 79 72 78 82
74 72 80 64 69
84 72 70 79 81
75 81 79 68 79
71 71 75 70 65
68 62 69 85 77
74 82 84 77 71
72 63 73 75 71
82 61 66 69 85
61 79 68 85 65
67 75 73 72 73

Solution

The R output follows. The standard deviation is assumed to be 7, the value of \(M\) computed from the data is 73.96, the computed test statistic is z = -1.29, and the p-value is 0.198. The null hypothesis is not rejected.

BSDA::z.test(x = p_8_24, sigma.x = 7, mu = 75, alternative = "two.sided")
## 
##  One-sample z-Test
## 
## data:  p_8_24
## z = -1.2867, p-value = 0.1982
## alternative hypothesis: true mean is not equal to 75
## 95 percent confidence interval:
##  72.37578 75.54422
## sample estimates:
## mean of x 
##     73.96

Problem 25

A psychological researcher believes that extra playtime with infants will result in a higher average weight at 2 years age. The average weight of humans at 2 years of age is 26 pounds with a standard deviation of 3.5 pounds for the general population. The researcher plans an experiment with 36 infants. She instructs the parents of the 36 infants to spend extra time playing with the infants and then determines their weights at 2 years of age. Would this be a one-sided or two-sided test?

Solution

This is a one-sided test.

Problem 26

A psychological researcher wishes to test whether a drug reduces appetite and, as a result,food consumption. Suppose rats are known to consume 12 grams of food per day with a standard deviation of 3 grams. Fifty of these rats are given the drug over a period of time and their average food consumption is determined. Would this be a one-sided or two-sided test?

Solution

This is a one-sided test.

Problem 27

An educational psychologist wishes to increase the usage of statistical software in her Statistics for Psychology course. She wants to determine if it will change the average performance of her students. The average previously on a final exam in the course has been 70 with a standard deviation of 5. Fifty students are taught the course with the increased use of statistical software. Would this be a one-sided or two-sided test?

Solution

This is a two-sided test.

Problem 28

Rats are known to reach an average weight at maturity of 930 grams with a standard deviation equal to 25 grams. Researchers believe that if the rats are fed a growth hormone, they will reach an average weight that exceeds 930 grams. Would this be a one-sided or two-sided test?

Solution

This is a one-sided test.

Problem 29

State the null hypothesis and the alternative hypothesis in Problem 25.

Solution

Let \(\mu\) represent the average weight for the infants who have increased playtime before age 2.

\[H_0: \mu = 26 \qquad H_1: \mu > 26\]

Problem 30

State the null hypothesis and the alternative hypothesis in Problem 26.

Solution

Let \(\mu\) represent the average food consumption of the rats given the weight-reducing drug.

\[H_0: \mu = 12 \qquad H_1: \mu < 12\]

Problem 31

State the null hypothesis and the alternative hypothesis in Problem 27.

Solution

Let \(\mu\) represent the average test score for the students who have their course taught with increased use of the statistical software

\[H_0: \mu = 70 \qquad \mu \neq 70\]

Problem 32

State the null hypothesis and the alternative hypothesis in Problem 28.

Solution

Let \(\mu\) represent the average weight of the rats given the growth hormone.

\(H_0: \mu = 930 \qquad H_1: \mu > 930\)

Problem 33

Refer to Problems 25 and 29. Suppose the mean weight of the sample of 36 two-year-olds who had longer playtimes as infants is 27.1 pounds. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 26 \qquad H_1: \mu > 26 \qquad Z = \frac{M-26}{\frac{\sigma}{\sqrt{n}}} = \frac{27.1-26}{\frac{3.5}{\sqrt{36}}} \approx 1.89\]

pnorm(1.885714286, lower.tail = FALSE)
## [1] 0.02966673

The p-value is the area under the standard normal curve to the right of 1.89. Using R, we find this area equals 0.029. The p-value for this hypothesis test is 0.029, which is less than \(\alpha = 0.05\), and therefore we reject the null hypothesis.

Alternatively, we have the same result with:

pnorm(q = 27.1, mean = 26, sd = 3.5 / sqrt(36), lower.tail = FALSE)
## [1] 0.02966673

Problem 34

Refer to Problems 26 and 30. The average weight of the sample of 50 rats when given the appetite suppressant is 11.2 grams. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05.\)

Solution

\[H_0: \mu = 12 \qquad H_1: \mu <12 \qquad Z = \frac{M-\mu}{\frac{\sigma}{\sqrt{n}}} = \frac{11.2-12}{\frac{3}{\sqrt{50}}} \approx -1.89\]

pnorm(-1.89)
## [1] 0.02937898

The p-value is the area under the standard normal curve to the left of -1.89. Using R, we find is 0.029. The p-value for this hypothesis test is 0.029, which is less than \(\alpha = 0.05\), and therefore we reject the null hypothesis.

Alternatively, we have the same result with:

pnorm(q = 11.2, mean = 12, sd = 3 / sqrt(50), lower.tail = TRUE)
## [1] 0.02967322

Problem 35

Refer to Problems 27 and 31. Suppose the average score on the test when computer software is used for a sample of 50 students is 69.3. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 70 \qquad \mu \neq 70 \qquad Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{69.3 - 70}{\frac{5}{\sqrt{50}}} \approx -0.99\]

pnorm(-0.99, lower.tail = TRUE) + pnorm(0.99, lower.tail = FALSE)
## [1] 0.3221741

The p-value is the area under the standard normal curve to the left of -0.99 plus the area to the right of 0.99, or simply double the area to the left of -0.99. Using R, we find = 2 * pnorm(-0.99), which equals 0.322. The p-value is \(0.322\), which is greater than \(\alpha = 0.05\) and we are unable to reject the null hypothesis.

Problem 36

Refer to Problems 28 and 32. Suppose the average weight of 50 rats, when given the growth hormone, is 945 grams. Give the computed z-test statistic, compute the p-value, and give your conclusion for \(\alpha = 0.05\).

Solution

\[H_0: \mu = 930 \qquad \mu > 930 \qquad Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{945 - 930}{\frac{25}{\sqrt{50}}} \approx 4.24\]

qnorm(pnorm(q = 945, mean = 930, sd = 25 / sqrt(50)))
## [1] 4.242641
pnorm(4.242641, mean = 0, sd = 1, lower.tail = FALSE)
## [1] 1.104523e-05

Equivalent to:

pnorm(q = 945, mean = 930, sd = 25 / sqrt(50), lower.tail = FALSE)
## [1] 1.104525e-05

Equivalent to:

1 - pnorm(q = 945, mean = 930, sd = 25 / sqrt(50))
## [1] 1.104525e-05

The p-value is the area under the standard normal curve to the right of 4.24. This area is given by 1 - pnorm(q = 4.242641). Because the p-value \(< \alpha\) , reject the null hypothesis.

Problem 37

In Problem 33, describe a type 1 and a type 2 error.

Solution

A type 1 error occurs if the sample evidence leads us to conclude that \(\mu > 26\) when \(\mu=26\)

A type 2 error occurs if sample evidence does not lead us to reject that \(\mu = 26\) when \(\mu > 26\)

Problem 38

In Problem 34, describe a type 1 and a type 2 error

Solution

A type 1 error occurs if the sample evidence leads us to conclude that \(\mu < 12\) when \(\mu = 12\).

A type 2 error occurs if the sample evidence leads us to conclude that \(\mu = 12\) when \(\mu < 12\).

Problem 39

In Problem 35, describe a type 1 and a type 2 error.

Solution

A type 1 occurs if the sample evidence lead us to conclude that \(\mu \neq 70\) when \(\mu = 70\).

A type 2 occurs if the sample evidence does not lead us to reject that \(\mu = 70\) when \(\mu \neq 70\).

Problem 40

In Problem 36, describe a type 1 and a type 2 error.

Solution

A type 1 occurs if the sample evidence lead us to conclude that \(\mu > 930\) when \(\mu = 930\).

A type 2 occurs if the sample evidence lead us to conclude that \(\mu = 930\) when \(\mu > 930\).

Problem 41

After working your way through Problems 25, 29, 33, and 37, put your z-test together as a complete test of hypotheses.

Solution

  1. Let \(\mu\) represent the average weight of 2-year-olds who had increased playtime as infants

\(H_0: \mu = 26\) The average weight of 2-years-olds who had increased playtime as infants is equal to 26 pounds, the same as the general population.

\(H_1: \mu > 26\) The average weight of 2-years-olds who had increased playtime as infants is greater than 26 pounds, the general population mean for 2-years olds.

  1. \(\alpha\) is set equal to 0.05.

  2. Thirty-six children had increased playtime as infants and the average weight is determined (at age 2) to be 27.1 pounds.

  3. The value of the test statistic is \(Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{27.1 - 26}{\frac{3.5}{\sqrt{36}}} = 1.89\)

We can reject \(H_0\) because \(Z\) is greater than

qnorm(p = 0.95)
## [1] 1.644854
  1. p-value = area under the standard normal curve to the right of \(1.89 = 0.029\). Because the p-value is les than \(\alpha\), reject the null and conclude that extra playtime as an infant increases the weight at 2 years of age.
pnorm(1.885714286, lower.tail = FALSE)
## [1] 0.02966673

Problem 42

After working your way through Problems 26, 30, 34, and 38, put your z-test together as a complete test of hypotheses.

Solution

  1. Let \(\mu\) represent the average food consumption of the rats given the appetite-reducing drug.

    \(H_0: \mu = 12\) The average food consumption of the rats given the appetite suppressant is the same as the general population.

    \(H_1: \mu < 12\) The average food consumption of the rats given the appetite suppresant is less than the food consumption of the general population.

  2. \(\alpha\) is set to \(0.05\).

  3. Fifty rats are given the food suppressant and their average food consumption is 11.2 grams.

  4. The value of the test statistic is \[Z = \frac{M-\mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{11.2-12}{\frac{3}{\sqrt{50}}} \approx -1.89\]

    We can reject \(H_0\) because \(Z\) is less than:

qnorm(p = 0.05)
## [1] -1.644854
  1. p-value = area under the standard normal curve to the left of \(-1.89 = 0.029\). Because the p-value is less than \(\alpha\), reject the null and conclude that the appetite suppressant drug reduce food consumption.
pnorm(q = -1.89)
## [1] 0.02937898

Problem 43

After working your way through Problems 27, 31, 35, and 39, put your z-test together as a complete test of hypotheses.

Solution

  1. Let \(\mu\) represent the average score of the students who are taught using statistical software.

\(H_0: \mu = 70\) The average test scores are the same as when the course is taught in the usual manner.

\(H_1: \mu \neq 70\) The average tests scores are not the same as when the course is taught in the usual manner.

  1. \(\alpha\) is set equal to \(0.05\).

  2. Fifty students are taught the course using statistical software. The average test score for the sample is \(69.93\).

  3. The value of the test statistic is \(Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{69.3 - 70}{\frac{5.0}{\sqrt{50}}} \approx - 0.99\)

c(qnorm(0.05/2), qnorm((1-0.95) / 2, lower.tail = FALSE))
## [1] -1.959964  1.959964

We cannot reject \(H_0\) because \(Z\) is between \(-1.96\) and \(1.96\)

  1. p-value \(= 0.322\). Because the p-value is greater than \(\alpha\), do not reject the null and conclude that the increased statistical software has no effect on the test score.
(z <- qnorm(pnorm(q = 69.3, mean = 70, sd = 5 / sqrt(50))))
## [1] -0.9899495
pnorm(z, lower.tail = TRUE) + pnorm(-z, lower.tail = FALSE)
## [1] 0.3221988

The above code is equivalent to:

2 * pnorm(q = 69.3, mean = 70, sd = 5 / sqrt(50))
## [1] 0.3221988

Problem 44

After working your way through Problems 28, 32, 36, and 40, put your z-test together as a complete test of hypotheses.

Solution

  1. Let \(\mu\) represent the average weight of the rats given the growth hormone.

\(H_0: \mu = 930\) The average weight of the rats given the growth hormone is the same as the general population.

\(H_1: \mu > 930\) The average weight of the rats given the growth hormone is greater than the general population.

  1. \(\alpha\) is set equal to \(0.05\).

  2. The average weight of the \(50\) rats given the growth hormone is 945 grams.

  3. The value of the test statistic is \(Z = \frac{M - \mu_0}{\frac{\sigma}{\sqrt{n}}} = \frac{945 - 930}{\frac{25}{\sqrt{50}}} \approx 4.24\)

qnorm(p = 0.95)
## [1] 1.644854

We can reject \(H_0\) because \(Z = 4.24\) is greater than \(1.65\)

  1. p-value \(=0.00001\). Because p-value is less than \(\alpha\), reject the null hypothesis and conclude that the growth hormone does cause an increase in average weight.

Problem 45

Table 8.7 gives the weights of \(n = 36\) two-year-olds who received extra playtime as infants. Use R to test \(H_0 : \mu = 26 \quad H_1 : \mu > 26\) with \(\alpha = 0.05\). The standard deviation is assumed to be \(3.5\).

table_8_7 <- c(28, 30, 26, 26, 23, 25, 30, 25, 26, 32, 27, 23, 23, 25, 29, 28, 
               25, 20, 30, 30, 30, 25, 22, 22, 28, 26, 29, 31, 24, 33, 23, 28, 
               20, 27, 21, 23)

Solution

The R output follows. The standard deviation is assumed to be \(3.5\), the value of \(M\) computed from the data is \(26.194\), the computed test statistic is \(z = 0.33\), and the p-value is \(0.369\). The null hypothesis is not rejected.

BSDA::z.test(table_8_7, sigma.x = 3.5, mu = 26, alternative = "greater")
## 
##  One-sample z-Test
## 
## data:  table_8_7
## z = 0.33333, p-value = 0.3694
## alternative hypothesis: true mean is greater than 26
## 95 percent confidence interval:
##  25.23495       NA
## sample estimates:
## mean of x 
##  26.19444

Problem 46

Table 8.8 gives the food consumption of \(n = 50\) rats given a appetite suppressant. Use R to test \(H_0: \mu = 12 \quad H_1: \mu < 12\) with \(\alpha = 0.05\). The standard deviation is assumed to be \(3\).

table_8_8 <- c(9, 10, 16, 10, 5, 16, 9, 11, 7, 8, 9, 9, 8, 14, 19, 9, 6, 8, 11, 9,
               14, 12, 15, 12, 10, 10, 14, 13, 5, 9, 5, 11, 11, 15, 15, 11, 10, 
               14, 9, 10, 18, 13, 14, 12, 9, 12, 13, 11, 12, 14)

Solution

The R output follows. The standard deviation is assumed to be 3, the value of \(M\) computed from the data is \(11.12\), the computed test statistic is \(z = -2.07\), and the p-value is \(0.019\). The null hypothesis is rejected.

BSDA::z.test(table_8_8, sigma.x = 3.0, mu = 12, alternative = "less")
## 
##  One-sample z-Test
## 
## data:  table_8_8
## z = -2.0742, p-value = 0.01903
## alternative hypothesis: true mean is less than 12
## 95 percent confidence interval:
##        NA 11.81785
## sample estimates:
## mean of x 
##     11.12

Problem 47

The next table gives the test scores from a sample of 50 students in a Statistics for Psychology course that uses statistical software on a weekly basis. Use R to test \(H_0: \mu = 70 \quad H_1: \mu \neq 70\) with \(\alpha = 0.05\). The standard deviation is assumed to be 5.

t47 <- c(75, 66, 76, 72, 78, 68, 70, 78, 71, 74, 75, 82, 67, 69, 74, 69, 65, 74,
         75, 77, 73, 73, 70, 83, 68, 67, 74, 73, 75, 69, 74, 65, 69, 70, 72, 64,  
         74, 74, 65, 72, 67, 74, 76, 72, 74, 74, 73, 75, 61, 73)

Solution

You should reject \(H_0\) if \(t\) is not between -2.0 and 2.0:

c(qt(p = 0.05/2, df = length(t47) - 1), qt(p = 1 - 0.05/2, df = length(t47) - 1))
## [1] -2.009575  2.009575

The R output follows. The standard deviation is assumed to be 5, the value of \(M\) computed from the data is 71.96, the computed test statistic is \(z = 2.77\), and the p-value is 0.006. The null hypothesis is rejected.

BSDA::z.test(t47, sigma.x = 5.0, mu = 70, alternative = "two.sided")
## 
##  One-sample z-Test
## 
## data:  t47
## z = 2.7719, p-value = 0.005574
## alternative hypothesis: true mean is not equal to 70
## 95 percent confidence interval:
##  70.5741 73.3459
## sample estimates:
## mean of x 
##     71.96

Problem 48

The nex table gives the weights of 50 rats taking a growth hormone. Use R to test \(H_0: \mu = 930 \quad H_1: \mu > 930\) with \(\alpha = 0.05\). The standard deviation is assumed to be 25

t48 <- c(947, 972, 896, 981, 973, 976, 948, 902, 966, 963, 958, 934, 934, 935,
         968, 960, 948, 933, 874, 917, 930, 928, 925, 932, 916, 893, 980, 953, 
         926, 935, 922, 938, 901, 902, 962, 909, 936, 926, 920, 953, 970, 916, 
         933, 913, 937, 934, 958, 967, 936, 916)

Solution

The R output follows. The standard deviation is assumed to be 25, the value of M computed from the data is 937.04, the computed test statistic is \(z = 1.99\), and the p-value is 0.023. The null hypothesis is rejected.

BSDA::z.test(t48, sigma.x = 25.0, mu = 930, alternative = "greater")
## 
##  One-sample z-Test
## 
## data:  t48
## z = 1.9912, p-value = 0.02323
## alternative hypothesis: true mean is greater than 930
## 95 percent confidence interval:
##  931.2246       NA
## sample estimates:
## mean of x 
##    937.04