STATISTICS FOR DECISION MAKING
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 1/42
6.1 Hypothesis testing
Hypothesis
A hypothesis is a proposed explanation of a phenomenon, usually as a starting point for further analysis. Ex: If a lamp doesn't illuminate when turned on, one hypothesis is: "Lamp is not plugged in". Subsequent analysis may result in rejecting the hypothesis. Ex: Observing the lamp is indeed plugged into an electric outlet causes one to reject the "Lamp is not plugged in" hypothesis.
PARTICIPATION ACTIVITY 6.1.1: Hypotheses.
Indicate which statements are likely to be hypotheses.
1) A researcher proposes collecting data for 1,000 people's daily sitting times and weights to determine if the following is true: The more one sits, the more weight one gains.
2) Upon obtaining data for 1,000 people's daily sitting times and weights and doing a calculation, a researcher writes: The 1,000 people had a mean sitting time of 5 hours per day.
3) A researcher proposes collecting data for 1,000 people's daily sitting times and genders, and computing the means for men and women separately, to determine if the following is true: In America, men sit longer than women each day.
4) People should stand more to gain
Hypothesis
Not a hypothesis
Hypothesis
Not a hypothesis
Hypothesis
Not a hypothesis
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 2/42
health bene�ts.
Forming a hypothesis
Hypothesis for one population
A common hypothesis formed by researchers is whether the correlation of two variables in a sample suggests that those variables are correlated in the population.
PARTICIPATION ACTIVITY 6.1.2: A common hypothesis relates to correlation of variables in a sample.
PARTICIPATION ACTIVITY 6.1.3: Hypotheses, samples, and populations.
Refer to the animation above.
1) The population data shows that as height increases, weight _____.
2) The sample consists of _____ members.
3) The sample's line indicates a _______ correlation.
Hypothesis
Not a hypothesis
Animation content:
undefined
Animation captions:
1. If a population is known, a line can be drawn showing the correlation of height and weight. 2. If a small sample is taken, a line can also be drawn. A hypothesis may ask if that correlation is
strong enough to infer the correlation exists in the population.
Increases
Decreases
10
3
Positive
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 3/42
4) A researcher hypothesizes: Greater height does NOT suggest greater weight. The steeper the line for the sample, the more likely is the analyst to _____ this hypothesis.
5) The analyst usually could just compute the correlation for an entire population.
Hypothesis for two populations
Researchers also commonly investigate hypotheses relating to two populations. Ex: Given samples from two populations, a hypothesis might be that the two populations have the same mean (the difference in the two samples' means is statistically insigni�cant). The challenge of course is that the analyst only has data from the samples; the population's data is unknown. Ex: Salaries for 100,000 people who live in a city can't reasonably become known to a researcher, but salaries for samples of 50 males and 50 females in that city can be known.
PARTICIPATION ACTIVITY
6.1.4: A common hypothesis asks whether two populations have the same mean vs. different means.
PARTICIPATION ACTIVITY 6.1.5: Hypotheses, samples, and populations.
Negative
reject
not reject
True
False
Animation content:
undefined
Animation captions:
1. In practice, hair color doesn't impact salary, so samples of blondes and brunettes are from populations with the same mean salary. The small difference in sample means is just due to chance.
2. In practice, smokers do have lower salaries, so smokers and non-smokers are from populations with different mean salaries. The larger difference in sample means is statistically signi�cant.
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 4/42
Refer to the above animation.
1) A researcher creates this hypothesis: Blondes and brunettes earn the same salary. Usually, the analyst can simply compute the mean for all blondes in the population, and for all brunettes, and then compare those two means.
2) A researcher creates this hypothesis: Blondes and brunettes earn the same salary. The analyst obtains data for a sample of 5 blondes and 5 brunettes, and determines a small difference exists. The hypothesis can be rejected.
3) Blondes and brunettes are shown to come from populations with the same mean salary in the animation's dot plots. Thus, for a different feature like hours spent at work, blondes and brunettes also come from populations with the same mean.
4) A researcher hypothesizes: Non- smokers earn the same as smokers. The large difference in mean salary for size-5 samples of non-smokers and smokers may cause the analyst to ______ that hypothesis.
Null and alternative hypotheses
True
False
True
False
True
False
Reject
Not reject
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 5/42
In statistics, a hypothesis is a statement that makes a claim about the parameters of one or more populations. Hypothesis testing is the formal process by which a hypothesis is retained or rejected. Hypothesis testing compares two competing hypotheses about a population, the null hypothesis and the alternative hypothesis.
A null hypothesis, denoted H0, is a statement assumed to be true unless su�cient data indicates otherwise. Typically, a null hypothesis is a statement of equality between the true value of the population parameter and the hypothesized value or a statement of no difference between the parameters of two populations. Ex: The statement "The average salary of the residents of San Francisco is not different than the average salary of the residents of Austin" or "The average salary of the residents of San Francisco is the same as the average salary of the residents of Austin" is a null hypothesis.
In contrast, an alternative hypothesis, denoted Ha, is a statement that contradicts H0. Typically, an alternative hypothesis asserts that the true value of the population parameter is not the same as the hypothesized value or that the parameters for two populations are different. Ex: The alternative hypothesis corresponding to the null hypothesis above is "The average salary of the residents of San Francisco is different from the average salary of the residents of Austin, Texas."
An alternative hypothesis may be left-tailed, right-tailed, or two-tailed depending on the nature of the difference from the null hypothesis.
A left-tailed alternative hypothesis asserts that the value of a parameter is less than the value asserted in the null hypothesis. A right-tailed alternative hypothesis asserts that the value of a parameter is greater than the value asserted in the null hypothesis. A two-tailed alternative hypothesis asserts that the value of a parameter is not equal to, that is, either less than or greater than the value asserted in the null hypothesis.
Example 6.1.1: Null hypothesis and alternative hypothesis.
Identify the type of each alternative hypothesis and state the corresponding null hypothesis.
a. The average time spent sitting at a particular company's o�ce is not 5.7 hours. b. Patients given a drug recover from a disease in less time than patients not given the
drug.
Solution
a. The alternative hypothesis asserts that a parameter is not equal to a value and is thus a two-tailed alternative hypothesis. The corresponding null hypothesis is "The average time spent sitting at a particular company's o�ce is 5.7 hours".
b. The alternative hypothesis asserts that a parameter is less than a value and is thus a left-tailed hypothesis. The corresponding null hypothesis is "Patients given a drug
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 6/42
recover from the disease in the same amount of time as or more time than patients not given the drug".
Example 6.1.2: Do non-smokers earn more than smokers?
Among Northern California's unemployed, 60 non-smokers and 29 smokers were surveyed after getting jobs, and those two samples' mean salaries were $32,000 and $24,000, respectively. Researchers posed two hypotheses:
(Null hypothesis) H0 : Non-smokers do NOT earn more than smokers. (Alternative hypothesis) Ha: Non-smokers earn more than smokers.
Through analysis of data, the researchers rejected the null hypothesis (do not earn more); the large salary difference among the two samples is unlikely explainable by chance. The researchers favored the alternative hypothesis, that non-smokers do earn more. Note that the study makes no claim that smoking causes lower salary; for example, smokers might have another trait that causes both lower salary and smoking.
PARTICIPATION ACTIVITY 6.1.6: Null and alternative hypotheses.
1) Initial data from a sample of 100 people suggests that stress increases blood pressure (a positive correlation is observed). What is the null hypothesis?
1
Source: Wikimedia/US Air Force, Anthony Sanchelli 2
Stress does not increase blood pressure.
Stress reduces blood pressure.
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 7/42
2) Initial data from a sample of 100 people suggests that sunlight improves moods. A null hypothesis is: Sunlight does not improve mood. What is the alternative hypothesis?
3) Initial data suggests mirrors at store entrances decrease shoplifting. Are the following reasonable null and alternative hypotheses? Null: A small mirror at a store entrance decreases shoplifting slightly. Alternative: A larger mirror decreases shoplifting further.
PARTICIPATION ACTIVITY 6.1.7: Types of alternative hypothesis.
Classify each alternative hypothesis as left-tailed, right-tailed, or two-tailed.
A particular baseball player will hit more than 28 home runs in the 2018 season.
The weight of a standardized part in an aircraft deviates from 15.4 kg.
The percentage of student drivers in California that pass a drive test on the �rst try is less than 45%.
Stress increases blood pressure.
Sunlight has no impact on mood.
Sunlight has no impact on mood is false.
Sunlight improves mood.
Yes
No
Two-tailed hypothesis Left-tailed hypothesis Right-tailed hypothesis
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 8/42
Comparative experiments
Sometimes a person creates hypotheses and analyzes existing data, such as examining U.S. Census Bureau data to compare employment statistics between 1970 and 2010. However, other times a person poses a hypothesis and then conducts a study to generate data to be analyzed. In one kind of study, the sample is divided into a treatment group who was given a treatment being studied (like doing daily exercise), and a control group who was not (like not doing daily exercise), with individuals randomly assigned to a group.
PARTICIPATION ACTIVITY 6.1.8: Control and treatment groups.
A study seeks to determine whether American college freshmen students earn higher grades if those students exercise regularly. 200 students from University XYZ are selected, and randomly assigned to group A or B. Group A is required to spend 15 minutes on a treadmill every morning, while group B is required to watch a 15 minute video every morning, for the entire semester. Grades at the end of the semester are then analyzed.
Note that numerous studies do conclude that exercise improves academic performance, from young children to college students .
All American college freshmen students.
The 200 University XYZ students.
100 students watching a daily video.
100 students using a treadmill daily.
Test statistic
Su�cient data from samples of populations are needed to test a hypothesis. Ex: If the average salary of a sample of 50 people from San Francisco is $105, 200 and the average salary of a sample of 40
Reset
3 4
Control group Sample Treatment group Population
Reset
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 9/42
people from Austin is $98, 700, no decision can be immediately made about the null hypothesis. Factors such as the sampling method, the sample size, and the magnitude of the difference in the average salary affect whether the hypothesis should be rejected. In addition, the observed difference in average salary may be due to chance.
The central goal of hypothesis testing is to determine whether H0 can be rejected in favor of Ha or whether H0 fails to be rejected based on evidence in the form of sample data. A test statistic is a value calculated from sample data during hypothesis testing that measures the degree of agreement between the sample data and the null hypothesis. Mathematically, the test statistic is the difference between the estimate and the value asserted in the null hypothesis divided by the standard error.
Common hypothesis tests and associated test statistics are shown in the following table. The speci�c methods and formulas used to �nd these test statistics are introduced elsewhere.
Table 6.1.1: Hypothesis tests and associated test statistics.
Application Hypothesis test Test statistic
One or two population μ, p, known σ Z-test Z-statistic
One or two population μ, unknown σ t-test t-statistic
Comparing a parameter among three or more groups ANOVA F-statistic
Comparing categorical variables Chi-square test χ2-statistic
p-value and statistical signi�cance
Intuitively, inferences cannot be made from a trivially small difference between populations or a difference between populations in which the sample sizes are very small, as differences can be observed by chance in such cases. The concept of statistical signi�cance formalizes the intuition of making inferences about populations from observed sample statistics. A statistically signi�cant result differs enough from a null hypothesis that a conclusion can be inferred about the population.
In hypothesis testing, the probability of obtaining a result that is as extreme or more extreme than the data if the null hypothesis were true is known as the p-value. The p-value of a result is determined from the test statistic. If the p-value is less than a speci�ed signi�cance level, denoted by α, then two possibilities exist.
The null hypothesis is true and the observed data is relatively unusual with a sample statistic that is extreme simply due to chance. The null hypothesis is false and the alternative hypothesis provides a more reasonable explanation for the population parameter.
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 10/42
In most �elds, α = 0.05 is used most often as the signi�cance level for hypothesis testing. Thus, the probability that a result with an extreme deviation from the null hypothesis is due to chance must be 5% or less for the result to be considered statistically signi�cant.
A practically signi�cant result implies that the magnitude of the difference between the hypothesized value of a parameter and the sample statistic is large enough to be meaningful in real life. Statistical signi�cance does not necessarily imply practical signi�cance of a result. Ex: A statistically signi�cant difference in the number of employees at a company arriving to work at 8:00 am and the number of employees arriving at 7:59 am is likely of little practical signi�cance.
PARTICIPATION ACTIVITY 6.1.9: The p-value.
1) The p-value is the same as the signi�cance level α.
2) The same p-value can imply statistical signi�cance in some hypothesis tests but not others.
3) Lower p-values imply greater practical signi�cance of the result of a hypothesis test.
Type I and type II errors
In hypothesis testing, a researcher can decide to reject the null hypothesis or fail to reject the null hypothesis. In reality, the null hypothesis is either true or false. Thus, the researcher can make an error by rejecting a true null hypothesis or failing to reject a false null hypothesis. A type I error is the incorrect rejection of a true null hypothesis, and a type II error is the failure to reject a false null hypothesis. In other words, a type I error is a false positive and a type II error is a false negative.
The signi�cance level of a hypothesis test, denoted α, is the probability of making a type I error. The probability of making a type II error is denoted β, and the probability 1 − β of avoiding type II errors is the power of the hypothesis test.
The following animation illustrates the relationship between the truth of H0, the decision made, and type I and type II errors.
True
False
True
False
True
False
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 11/42
PARTICIPATION ACTIVITY 6.1.10: Type I and type II errors.
The following �gure shows the regions of two normally distributed random variables corresponding to a null hypothesis and an alternative hypothesis along with the regions corresponding to type I and type II errors.
Figure 6.1.1: Regions corresponding to type I and type II errors for two normally distributed random variables corresponding to a null hypothesis and an alternative hypothesis.
PARTICIPATION ACTIVITY 6.1.11: Types of errors.
Match each scenario with the correct description.
Animation captions:
1. In hypothesis testing, the null hypothesis H0 is either true or false. 2. Two decisions are possible. Either H0 is rejected, or H0 fails to be rejected. 3. Rejecting H0 is the correct decision if H0 is false. 4. However, rejecting H0 if H0 is true is known as a type I error. The probability of a type I error is
the signi�cance level of the test, denoted α. 5. Failing to reject H0 is the correct decision if H0 is true. 6. However, failing to reject H0 if H0 is false is known as a type II error. The probability of a type II
error is denoted β. 7. The power of a statistical test is 1 − β. Ideally, a statistical test should have a low signi�cance
level (α) and high power (1 − β).
Type I error Type II error No error
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 12/42
Null hypothesis: The suspect did not commit a crime.
Actual outcome: The suspect committed the crime.
Decision: The suspect was found not guilty.
Null hypothesis: The suspect did not commit a crime.
Actual outcome: The suspect committed the crime.
Decision: The suspect was found guilty.
Null hypothesis: The suspect did not commit a crime.
Actual outcome: The suspect did not commit the crime.
Decision: The suspect was found guilty.
Summary of hypothesis testing
The following are the basic steps of performing a hypothesis test.
1. Specify the null hypothesis H0 and the alternative hypothesis Ha. 2. Specify the signi�cance level α. 3. Collect the data. 4. Calculate the test statistic and the corresponding p-value. 5. Compare the p-value with the signi�cance level. 6. Determine whether to reject or fail to reject H0.
References
Reset
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 13/42
(*1) Judith J. Prochaska, Anne K. Michalek, Catherine Brown-Johnson, Eric J. Daza, Michael Baiocchi, Nicole Anzai, Amy Rogers, Mia Grigg, Amy Chieng. Likelihood of Unemployed Smokers vs Nonsmokers Attaining Reemployment in a One-Year Observational Study. JAMA Internal Medicine, 2016.
(*2) Sanchelli, Anthony. "Lighting a cigarette." Wikipedia: The Free Encyclopedia. Wikipedia, The Free Encyclopedia, 26 Feb 2013, https://commons.wikimedia.org/wiki/File%3ALighting_a_cigarette.jpg.
(*3) Trost, Stewart G. "Active education: Physical education, physical activity and academic performance." (2007). https://folio.iupui.edu/bitstream/handle/10244/587/Active_Ed.pdf?sequence=2
(*4) Neubert, Amy Patterson. "College students working out at campus gyms get better grades." Purdue Today (2013). http://www.purdue.edu/newsroom/releases/2013/Q2/college-students- working-out-at-campus-gyms-get-better-grades.htm.
6.2 Hypothesis test for a population mean
z-test for population means
A z-test is a hypothesis test in which the z-statistic follows a normal distribution. The z-test for a population mean can be used to determine whether the population mean is the same as the hypothesized mean μ0, assuming that the population standard deviation σ is known. When performing a hypothesis test involving the mean of a single population with a known population standard
deviation, the distribution of the z-test statistic is assumed to be N μ0, x̄ − μ0
σ
√n
. In practice, the
population standard deviation is rarely known, so a more useful test involves the t-distribution because the standard deviation of a sample can always be computed.
Conditions for performing the z-test for a population mean
Randomness. Data should be collected randomly by means of simple random sampling, strati�ed random sampling, or cluster sampling. For the examples presented in this material, this condition can be assumed. Independence. Each observation should not affect other observations. In most surveys, sampling is performed without replacement, which means that a person or an observation is not used twice. For sampling without replacement, the sample size should be less than 10% of the population size to guarantee independence.
( )
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 14/42
Normality. The sampling distribution should be approximately normal, which is guaranteed either when the sample size is at least 30 by the CLT or when the data's parent distribution is also normal.
Procedure 6.2.1: Hypothesis testing for population means.
Given a randomly selected sample taken from a population with a known population standard deviation σ
Set the null and alternative hypotheses
H0 : μ = μ0Ha : μ > μ0(right-tailed)Ha : μ < μ0(left-tailed)Ha : μ ≠ μ0(two-tailed)
where μ is the population mean and μ0 is the hypothesized population mean.
Use statistical software to �nd the test-statistic
z = x̄ − μ0
σ
√n
Use statistical software to �nd the p-value that corresponds to z. Make a decision given a previously selected signi�cance level α, typically 0.05. If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis H0 in favor of the alternative hypothesis Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis H0.
Example 6.2.1: Mean battery life.
A popular electronics website wants to determine whether a smartphone has an 7.8 hour battery life as claimed by the manufacturer in response to user complaints of poor battery life. The website sampled 10 smartphones with a mean battery life of 7.6 hours. The population standard deviation of the battery life is σ = 0.57 hours. Does su�cient evidence exist that the battery life of the smartphone is actually lower than the manufacturer's claim at a signi�cance level of α = 0.05?
Solution
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 15/42
The null hypothesis is that the smartphone's mean battery life is μ0 = 7.8 hours. Because customers believe that the mean battery life is lower, the hypothesis test is left-tailed. That is, the alternative hypothesis is that the smartphone's mean battery life is less than 7.8 hours. Mathematically,
H0 : μ = 7.8Ha : μ < 7.8
Since x̄ = 8, n = 10, and σ = 0.57, the test statistic is
z = 7.6 − 7.8
0.57
√10
≈ − 1.110
The p-value is
p-value = P(z ≤ − 1.110) ≈ 0.133
Since the p-value is greater than the signi�cance level α = 0.05, insu�cient evidence exists to support the hypothesis that the mean battery life of the smartphone is less than the manufacturer's claim.
Analysis
Although the mean battery life of the 10 sampled smartphones is less than the manufacturer's claim, the lower mean could have occurred due to chance. However, the probability that the sample mean battery life is at most 7.6 hours is 13.3%, which is much higher than the probability of incorrectly rejecting the manufacturer's claim that the smartphone has a mean battery life of 7.8 hours. Thus, the lower sample mean can be most likely be attributed to chance.
Example 6.2.2: Carry-on baggage volume.
An airline conducts a study on the volume of carry-on luggage. Many �ight attendants believe that the average volume of carry-on luggage passengers bring onto airplanes exceeds the allowed 1.6 ft . The airline samples 73 pieces of carry-on luggage with an average volume of 1.7 ft . Does su�cient evidence exist that passengers routinely bring luggage that exceeds
3
3
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 16/42
the maximum allowed volume given a population standard deviation of σ = 0.29 ft at a signi�cance level of α = 0.10?
Solution
The null hypothesis is that the mean carry-on luggage volume is at most 1.6 ft . Since �ight attendants believe that the luggage passengers carry routinely exceeds the limit, the hypothesis test is right-tailed. That is, the alternative hypothesis is that the mean volume of carry-on luggage is greater than 1.6 ft . Mathematically,
H0 : μ = 1.6Ha : μ > 1.6
Since x̄ = 1.7, n = 73, and σ = 0.29, the test statistic is
z = 1.7 − 1.6
0.29
√73
≈ 2.946
The p-value is P(z ≥ 2.946) ≈ 0.002.
Since the p-value is less than the signi�cance level α = 0.1, su�cient evidence exists to support the hypothesis that passengers routinely exceed the allowed volume limit for carry- on luggage.
Analysis
The maximum carry-on allowance of 1.6 ft suggests that the null hypothesis should be μ ≤ 1.6. However, the null hypothesis is de�ned as a claim of equality. In addition, rejecting a null hypothesis of μ = 1.6 implies than a population mean of less than 1.6 will also be rejected. Thus, the convention is to always express the null hypothesis as a statement of equality and so H0 : μ = 1.6.
Although the mean volume of the 73 sampled carry-on luggage is greater than the manufacturer's claim, the greater mean volume could have occurred due to chance. However, the probability that the sample mean luggage volume is at least 1.6 ft is 0.2%, which is much lower than the probability of incorrectly rejecting the claim that the mean is less than 1.6 ft . Thus, the greater sample mean cannot be attributed to chance.
PARTICIPATION
3
3
3
3
3
3
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 17/42
ACTIVITY 6.2.1: Intelligence quotient.
Intelligence quotient (IQ) test scores are believed to have a mean of 100 and a population standard deviation of 15. In a random sample of 36 students in a high school, the mean IQ test score is 105. Researchers claim that the mean IQ test scores at this high school is statistically higher than 100.
1) What is the hypothesized mean?
2) Is the hypothesis test two-tailed, right- tailed, or left-tailed? Type as: two-tailed, left-tailed, or right-tailed
3) What is the z-score?
4) What is the p-value? Type as: #.###
5) Should the null hypothesis that the IQ test scores of students at the high school is equal to 100 be rejected at the α = 0.05 signi�cance level? Type as: yes or no
Student's t-test
Check Show answer
Check Show answer
Check Show answer
Check Show answer
Check Show answer
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 18/42
Because the population standard deviation is rarely known, the t-test is commonly used to compare the observed sample mean to a hypothesized mean. The following conditions must be met to use the t-distribution.
Conditions for the t-distribution
Randomness. Data should be collected randomly by means of simple random sampling, strati�ed random sampling, or cluster sampling. For the examples presented in this material, this condition can be assumed. Independence. Each observation should not affect other observations. Normality. The t-distribution can be used if the underlying population distribution is approximately normal. In most cases, the normality of the underlying distribution cannot be determined. Thus, the sample size determines whether the t-distribution can be used.
If the sample size is less than 15, the t-distribution can be used if the data is not skewed or no outliers are present. If the sample size is between 15 and 30, the t-distribution can be used even if the data is mildly skewed. If outliers can be removed, then using the t- distribution is also appropriate. The t-distribution can always be used when the sample size is su�ciently large and extreme outliers can be removed.
Procedure 6.2.2: The t-test.
1. Set the null and alternative hypotheses
H0 : μ = μ0Ha : μ > μ0 (right-tailed)Ha : μ < μ0 (left-tailed)Ha : μ ≠ μ0 (two-tailed)
where μ is the population mean and μ0 is the hypothesized population mean.
2. Use statistical software to �nd the t-statistic and the degrees of freedom df:
t = x̄ − μ0
s
√n
and
df = n − 1
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 19/42
3. Use statistical software to �nd the p-value that corresponds to t. 4. Make a decision given a previously selected signi�cance level α, typically 0.05.
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis H0 in favor of the alternative hypothesis Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis H0.
Example 6.2.3: Circumference of basketballs.
The mean circumference of basketballs produced in a manufacturing facility is supposed to be 29 inches. A random sample of 25 basketballs has a mean of 29.1 inches with a sample standard deviation of 0.217 inches. The quality control supervisor claims that the mean circumference of the basketballs produced in the facility is different from 29 inches. At the α = 0.01 signi�cance level, does su�cient evidence exist to support the supervisor's claim?
Solution
The null hypothesis is that the mean circumference of basketballs produced in the facility is 29 inches. Since the supervisor's claim is that the mean circumference is different from 29 inches, the hypothesis test is two-tailed. Mathematically,
H0 : μ = 29Ha : μ ≠ 29
Since x̄ = 29.1, n = 25, and s = 0.217, the test statistic is
t = x̄ − μ
s
√n
= 29.1 − 29
0.217
√25
≈ 2.304
The two-tailed p-value is P(t ≤ − 2.30 or t ≥ 2.30) = 0.030.
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 20/42
Since the p-value is greater than the signi�cance level (0.030 > 0.01), insu�cient evidence exists to support the claim that the mean circumference of basketballs produced in the facility is different than 29 inches.
Analysis
Because the population standard deviation σ is unknown, the t-test is used instead of the z- test.
PARTICIPATION ACTIVITY 6.2.2: Exam scores.
Using the ExamScores dataset, a teacher found that the mean score for Exam2 is 79.4, which is below the expected mean of 83. At the α = 0.05 signi�cance level, does su�cient evidence exist that the mean score of the class is lower than the expected mean? Use the output below.
1) What is the null hypothesis H0?
2) What is the alternative hypothesis Ha?
3)
x̄ = 79.4
μ = 83
t = − 1.776
μ ≠ 83
μ < 83
μ > 83
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 21/42
What is the p-value?
4) What is the conclusion for the t-test?
CHALLENGE ACTIVITY 6.2.1: Hypothesis test for a population mean.
0.082
0.041
Reject H0
Fail to reject H0
Start
2 3 4
A factory that manufactures screws is performing a quality control experiment. Each object should have a length of no more than \(18\) centimeters. The factory believes that the length of the screws is less than this value and measures the length of \(87\) screws. The sample mean screw length was \ (17.95\) centimeters. The population standard deviation is known to be \ (\sigma = 0.21\) centimeters. What is the null hypothesis? What is the alternative hypothesis?
Check Next
6.3 Hypothesis test for a population proportion The z-test can also be used to determine whether the population proportion is the same as the hypothesized proportion p0. When performing a hypothesis test involving the proportion of a single
1
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 22/42
population, the distribution of the z-test statistic is assumed to be N p0, p0(1 − p0)
n .
The conditions that must be satis�ed are similar to those of the z-test for a population mean. However, to satisfy the normality condition, np0 ≥ 5 and n(1 − p0) ≥ 5 where n is the sample size and p0 is the hypothesized proportion.
Procedure 6.3.1: Hypothesis testing for population proportion.
Given a randomly selected sample taken from a population
1. Set the null and alternative hypotheses
H0 : p = p0Ha : p > p0 (right-tailed)Ha : p < p0 (left-tailed)Ha : p ≠ p0 (two-tailed)
where p is the population proportion and p0 is the hypothesized population proportion.
2. Use statistical software to �nd the test-statistic
z = p̂ − p0
p0(1 − p0)
n
3. Use statistical software to �nd the p-value that corresponds to z. 4. Make a decision given a previously selected signi�cance level α, typically 0.05.
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis H0 in favor of the alternative hypothesis Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis H0.
Example 6.3.1: Human sex ratio.
The human sex ratio is the ratio of the number of males to the number of females within a certain age group. According to a 2002 study on sex ratios , the expected ratio of males to females is 106 to 100 or 0.515. Because of cultural norms and national health policies, some nations may have a much higher or much lower sex ratio. In a random sample of 189 people, 85 people are males. Does su�cient evidence exist that the sex ratio of males to females in the population is different than expected at the α = 0.05 signi�cance level?
( √ )
√
1
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 23/42
Solution
Since the dataset contains binary categorical data, the hypothesis test involves population proportion rather than population mean. The null hypothesis is that the sex ratio of males to females is 0.515. Since the question asks if the ratio is different, the hypothesis test is two- tailed with an alternative hypothesis that the sex ratio of males to females is not 0.515. Mathematically,
H0 : p = 0.515Ha : p ≠ 0.515
85 of 189 people in the sample are males, so the sample proportion is p̂ = 85
189 ≈ 0.450. Since
p0 = 0.515 and n = 189, the test statistic is
z = p̂ − p0
p0(1 − p0)
n
= 0.45 − 0.515 0.515 ( 1 − 0.515 )
189
≈ − 1.795
The p-value is P(z ≤ − 1.795 or z ≥ 1.795) ≈ 0.074.
Since the p-value is greater than the signi�cance level α = 0.05, insu�cient evidence exists to support the claim that the sex ratio in the population from which the same is drawn is different than the expected sex ratio of 0.515.
Analysis
The p-value of a two-tailed test is twice that of a one-tailed test. Since the question is framed as a difference from the expected proportion, the area above z = 1.79 is included in the p- value. Note that had the question stated that the sex ratio of males to females is lower instead of different, then the results would have been that su�cient evidence exists to conclude that sex ratio of males to females is lower than the expected ratio of 0.515 because the p-value for a one-tailed test is 0.037.
√ √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 24/42
Example 6.3.2: Customer satisfaction.
After a series of scandals, the percentage of satis�ed customers of an airline dipped to an all time low of 47%. As a result, aggressive changes were implemented to improve customer experience and a public relations �rm was hired to rehabilitate the airline's image. To determine if their efforts are successful, a survey was conducted to determine if customers were satis�ed or unsatis�ed with the airline. 132 of the 240 respondents answered that their experience was satisfactory. Does su�cient evidence exist that the company's efforts were succeeding at the α = 0.05 signi�cance level? That is, does statistically signi�cant evidence exist that suggests that the proportion of satis�ed customers is higher?
Solution
Since the survey asked if the customers were satis�ed or unsatis�ed, the dataset contains binary categorical data. Thus, the hypothesis test involves population proportion instead of population mean. The null hypothesis is that the customer satisfaction proportion holds steady. Since the board of directors want to know if the changes are successful in increasing customer satisfaction, the hypothesis test is right-tailed with an alternative hypothesis that the percentage of satis�ed customers is higher. Mathematically,
H0 : p = 0.47Ha : p > 0.47
132 of the 240 respondents viewed their experience as satisfactory, so the sample proportion
is p̂ = 132 240 = 0.55. Since p0 = 0.47 and n = 240, the test statistic is
z = p̂ − p0
p0(1 − p0)
n
= 0.55 − 0.47 0.47 ( 1 − 0.47 )
240
≈ 2.483
The p-value is P(z ≥ 2.483) ≈ 0.006.
Since the p-value is less than the signi�cance level α = 0.05, su�cient evidence exists to support the claim that the customer satisfaction is higher than the all time low of 47%.
√ √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 25/42
PARTICIPATION ACTIVITY 6.3.1: Exam scores proportion.
Using the ExamScores dataset, a teacher found that 31 of 50 students scored over 80 in Exam1, which is over the expected proportion of 0.5. At the α = 0.01 signi�cance level, does su�cient evidence exist that the proportion of scores over 80 is greater than 0.5? Use the output below.
1) What is the null hypothesis H0?
2) What is the alternative hypothesis Ha?
3) What is the p-value?
4) What is the conclusion for the t-test?
CHALLENGE ACTIVITY 6.3.1: Hypothesis test for a population proportion.
p̂ = 0.62
p = 0.5
p = 0.62
p ≠ 0.5
p < 0.5
p > 0.5
0.0804
0.0402
Reject H0
Fail to reject H0
Start
A software company is interested in improving customer satisfaction rate from the \(53\%\) currently claimed. The company sponsored a survey of \(212\) customers and found that \(124\) customers were satis�ed. What is the test statistic \(z\)?Ex: 2.22
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 26/42
References
(*1) Grech, Victor, et al. "Unexplained differences in sex ratios at birth in Europe and North America." BMJ, 324(7344), 27 April 2002, www.ncbi.nlm.nih.gov/pmc/articles/PMC102777/
2 3
Check Next
6.4 Hypothesis test for the difference between two population means
Comparing two populations
Hypothesis testing involving a one-sample test determines whether an observed value differs statistically from a hypothesized population value. Sometimes, differences between two populations are studied instead. Ex: Pollsters often look at issues in which the opinions of two different groups may vary wildly, such as political preferences of men compared to those of women.
Hypothesis tests involving two samples follow the same steps. A survey is conducted and statistics are calculated. The standard error for the difference between populations is the square root of the sum of the squares of the standard errors of each population. The test statistic is the difference between the observed and hypothesized value divided by the standard error. Mathematically,
SE for the difference = SE21 + SE 2 2test statistic =
observed difference - hypothesized difference SE for the difference
Two-sample z-test for population means
The z-test can also be used to determine whether the means of two independent populations are the same when the population standard deviations are known. When performing a hypothesis test involving the means of two independent populations, the distribution of the z-test statistic is assumed
to be N 0, σ21
n1 +
σ22
n2 . In practice, the standard deviation for populations are generally unknown, so
either the paired or unpaired t-test is needed.
√
( √ )
1
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 27/42
The conditions that must be satis�ed are similar to those of a z-test for a population mean.
Procedure 6.4.1: Hypothesis testing for two population means.
Given two randomly selected samples each taken from an independent population where the standard deviations of each population is known,
1. Set the null and alternative hypotheses
H0 : μ1 = μ2Ha : μ1 < μ2(left-tailed)Ha : μ1 > μ2(right-tailed)Ha : μ1 ≠ μ2(two-tailed)
where μ1 and μ2 are means from distinct populations.
2. Use statistical software to �nd the test-statistic
z =
¯ x1 − x̄2 − 0
σ21 n1
+ σ22 n2
where SE = σ21 n1
+ σ22 n2
.
3. Use statistical software to �nd the p-value that corresponds to z. 4. Make a decision given a previously selected signi�cance level α, typically 0.05.
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis H0 in favor of the alternative hypothesis Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis H0.
Example 6.4.1: Candle burn times.
The mean burn time of two brands of 11-ounce candles are compared by a home safety magazine. The burn times of 100 candles of each brand are measured. The results are given in the table below.
Candle Sample mean burn time (hours) Population standard deviation (hours)
1 27.5 2.5
√ √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 28/42
2 26 3.5
Does su�cient evidence exist supporting the claim that the mean burn time of candle 1 is greater than the mean burn time of candle 2 at the α = 0.05 signi�cance level?
Solution
The null hypothesis is that the two mean burn times for both brands of candles are the same. Since the question asks if the mean burn time of candle 1 is greater than the mean burn time of candle 2, the hypothesis test is right-tailed. Mathematically,
H0 : μ1 = μ2Ha : μ1 > μ2
The z-statistic is
z =
¯ x1 − x̄2 − 0
σ21
n1 +
σ22
n2
= 27.5 − 26 − 0
2.52
100 + 3.52
100
≈ 3.487
The p-value is close to 0. Since the p-value is less than the signi�cance level, su�cient evidence exists supporting the claim that the mean burn time of candle 1 is greater than the mean burn time of candle 2.
Example 6.4.2: Extrasensory perception.
A study is conducted to determine whether extrasensory perception (ESP) is a real phenomenon. 50 subjects claiming to have ESP answer a set of questions testing the subject's abilities. 60 subjects who do not claim to have ESP also answer the same set of questions. The results of the test are summarized in the table below.
Subject Mean score Population standard deviation
1 (ESP) 12 4.5
√ √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 29/42
2 (non-ESP) 10 4.0
Does su�cient evidence exist supporting the claim that mean test score of subjects claiming to have ESP is different from the mean test score of subjects who don't claim to have ESP at the α = 0.05 signi�cance level?
Solution
The null hypothesis is that the two mean scores for the subjects claiming to have ESP and those who do not are the same. Since the question asks if the scores are different, the hypothesis test is two-tailed. Mathematically,
H0 : μ1 = μ2Ha : μ1 ≠ μ2
The z-statistic is
z =
¯ x1 − x̄2 − 0
σ21 n1
+ σ22 n2
= 12 − 10 − 0
4.52
50 + 4.02
60
≈ 2.440
The p-value is P(z ≤ − 2.440 or z ≥ 2.440) = 0.015. Since the p-value is less than the signi�cance level (0.015 < 0.05), su�cient evidence exists that the mean scores of subjects claiming to have ESP and those who do not are different.
PARTICIPATION ACTIVITY 6.4.1: Commute times.
A transportation commission studies driving times between two cities to determine whether the construction of a new highway reduced commute times. Times for 40 cars driving on the old highway and times for 50 cars driving on the new highway are obtained. A summary of the data obtained from the study is given below.
√ √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 30/42
Highway Mean commute times Population standard deviation
1 (Old) 5.35 0.5
2 (New) 4.95 0.8
1) What is the standard error? Type as: #.###
2) What is the z-score? Type as: #.###
3) What is the p-value? Type as: #.######
4) Should the null hypothesis that the mean commute time for the old highway is equal to the mean commute time for the new highway be rejected at the α = 0.05 signi�cance level using the output below? Type as: yes or no
Two-sample t-test
The t-test discussed analyzes the difference between the sample mean and the hypothesized value of the population mean. A similar method exists to compare the means of two different populations. The two-sample t-test is used to determine if a statistically signi�cant difference exists between two population means. Two types of two-sample t-tests exist: paired and unpaired.
In a paired t-test or dependent t-test, a sample taken from one population is exposed to two different treatments. The main idea is that measurements are recorded from the same group, usually before
Check Show answer
Check Show answer
Check Show answer
Check Show answer
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 31/42
and after a treatment is applied or when each of two treatments is applied. Ex: A group of professional cycling athletes is selected for a study on the effects of caffeine dosage on exhaustion times. The populations are the cyclists for each of two dosages. The samples are the measured exhaustion times for each dosage, which implies dependence because the measurements were taken from the same group.
In an unpaired t-test or independent t-test, a sample taken from one population is not related to a different sample taken from another population. In contrast to the paired t-test, measurements from an unpaired t-test are recorded from different groups when exposed to the same treatment. Ex: The effect of caffeine intake on exhaustion times is studied by measuring the exhaustion times of a randomly selected group of 9 professional cyclists taking caffeine pills and another group of 9 cyclists not taking caffeine pills. The two populations are all cyclists taking caffeine pills and those who are not taking the pills. The samples are the measured exhaustion times from the two groups, each with 9 cyclists, which implies independence because the times are for two different groups of cyclists.
PARTICIPATION ACTIVITY 6.4.2: Identifying the type of two-sample t-test.
1) A study involving children from a preschool compares the median times to recite words with two and three syllables.
2) A study on the impact of meal preparation programs compares caloric intake between treatment and control groups.
3) A study on the di�culty of a maze game involves comparing the error rates between adults and children.
4) A study involving track and �eld athletes compares resting heart rate to heart rate after running a race.
paired
unpaired
paired
unpaired
paired
unpaired
paired
unpaired
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 32/42
Paired t-test
To obtain probabilities for a paired t-test, the paired t-statistic is needed. The formula involves �nding the mean and standard deviation of the differences between corresponding measurements :
t =
¯ d − μd
sd
√n
where sd is the sample standard deviation of the differences, ¯ d is the mean difference between the
samples, and n is the sample size. The most common scenario is that the hypothesized mean difference is 0. However, this scenario is not necessary. Ex: To continue the development of a new drug, a measurable improvement in the condition of the subjects must be seen. In this situation, the null hypothesis would be that the mean difference is the minimum amount of improvement set by the manufacturer in order to continue developing the drug. The differences are assumed to come from a normal distribution. Thus, the differences can be seen as a single sample following a t-distribution, which means that a paired t-test is equivalent to a one-sample t-test.
Procedure 6.4.2: Paired t-test.
Given two randomly selected samples of size n taken from each of two populations with unknown population standard deviation σ,
1. Set the null and alternative hypotheses:
H0 : μd = 0
Ha : μd > 0 (right-tailed)
Ha : μd < 0 (left-tailed)
Ha : μd ≠ 0 (two-tailed)
where μd is the mean difference between the populations. 2. Use statistical software to �nd the t-statistic and the degrees of freedom df:
t =
¯ d − μd
sd
√n
and
df = n − 1
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 33/42
3. Use statistical software to �nd the p-value that corresponds to t. 4. Make a decision given a previously selected signi�cance level α, typically 0.05:
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis, H0, in favor of the alternative hypothesis, Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis, H0.
Example 6.4.3: Improvement in exam scores.
In the ExamScores dataset, four exam scores of the same 50 students are recorded. The teacher believes that students scored worse on Exam2 than Exam1. Does statistically signi�cant evidence exist to support the teacher's belief at the α = 0.05 signi�cance level? Use the output below to answer the question.
Link to spreadsheet
Solution
Since both exams are taken by the same group of students, the hypothesis test is a paired t- test.
The null hypothesis is that the mean Exam1 scores and the mean Exam2 scores are the same. The alternative hypothesis is that the mean Exam1 scores is less than the mean Exam2 scores. Mathematically,
H0 : μ1 = μ2Ha : μ1 > μ2
The p-value in the output is a two-tailed p-value. The one-tailed p-value that corresponds to
the t-statistic of 1.418 is 0.163
2 = 0.082.
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 34/42
Since the p-value is greater than the signi�cance level (0.082 > 0.05), insu�cient statistical evidence exists to support the teacher's claim that students' scores were worse on Exam2 than on Exam1.
PARTICIPATION ACTIVITY 6.4.3: Caffeine and athletic performance.
The Caffeine dataset uses data from "The Effect of Different Dosages of Caffeine on Endurance Performance Time", International Journal of Sports Medicine and gives the endurance times (in minutes) of 9 athletes when given a caffeine dose of 5 milligrams and 13 milligrams.
1) What is the null hypothesis H0?
2) What is the alternative hypothesis Ha?
3) What is the p-value?
4) What is the conclusion for the t-test?
Unpaired t-test
The t-test statistic for unpaired data is different from that of paired data. The formula involves subtracting the means of the two samples:
1
¯ d = − 0.4722
μd = 0
t = − 0.1205
μd ≠ 0
μd < 0
μd > 0
0.907
0.454
Reject H0
Fail to reject H0
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 35/42
x̄1 − x̄2 − (μ1 − μ2)
s21 n1
+ s22 n2
where ¯ x1, s1, and n1 are the mean, standard deviation, and sample size of the sample drawn from the
�rst population respectively; and ¯ x2, s2, and n2 are the mean, standard deviation, and sample size of
the sample drawn from the second population. Since only sample means are subtracted and not individual observations, sample sizes do not need to be equal. The degrees of freedom are df = n1 + n2 − 2. Although μ1 − μ2 can be any number based on the hypothesized means for the two populations, most of the time, the accepted difference between the means of the populations is 0. Finally, the formula for the t-statistic above assumes that the variances are unequal. In most practical instances, the equality of variances should be veri�ed using the Fisher's F-test before performing the unpaired t-test. However, this is beyond the scope of the material.
Procedure 6.4.3: Unpaired t-test.
Given two randomly selected samples taken from each of two independent populations with unknown population standard deviation σ,
1. Set the null and alternative hypotheses:
H0 : μ1 = μ2 Ha : μ1 > μ2 (right-tailed)
Ha : μ1 < μ2 (left-tailed)
Ha : μ1 ≠ μ2 (two-tailed)
where μ1and μ2 are the means of the populations. 2. Use statistical software to �nd the t-statistic when population variances are not equal
and degrees of freedom df:
t = x̄1 −
¯ x2
s21 n1
+ s22 n2
and
df = n1 + n2 − 2
√
√
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 36/42
3. Use statistical software to �nd the p-value that corresponds to t. 4. Make a decision given a previously selected signi�cance level α, typically 0.05:
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis, H0, in favor of the alternative hypothesis, Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis, H0.
Example 6.4.4: Packing machines.
To improve production capacity, a manufacturing company buys a new machine that claims to pack 50 widgets in a carton faster than the old machine can. The Machines dataset records the amount of time (in seconds) each machine can complete the packing task for 10 batches of 50 widgets. Does su�cient evidence exist at the α = 0.05 signi�cance level to support the claim that the new machines can pack widgets faster? Use the output below to answer the question.
Solution
Since the times are taken from two different machines, the hypothesis test is an unpaired t- test.
The null hypothesis is that the mean packing time for the old machine μ1 and the mean packing time for the new machine μ2 is the same. The alternative hypothesis is that the mean packing time for the old machine is greater than the mean packing time for the new machine, because a faster machine implies a lower mean time. Mathematically,
H0 : μ1 = μ2Ha : μ1 > μ2
Note that the p-value in the output is a two-tailed p-value. The one-tailed p-value that
corresponds to the t-statistic of 3.397 is 0.0032
2 = 0.0016.
Since the p-value is less than the signi�cance level (0.0016 < 0.05), su�cient statistical evidence exists to reject the null hypothesis that mean packing time for both machines is the same.
PARTICIPATION ACTIVITY 6.4.4: Memory.
The Memory dataset contains the number of errors made while completing a memory- related task by a group of 10 people taking a �ctional memory enhancement drug and by
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 37/42
another group of 10 people not taking the drug. A researcher in the study claims that the �ctional drug is effective in reducing the number of errors in memory-related tasks.
Let μ1 be the mean number of errors in the group taking the drug and μ2 be the mean number of errors in the group not taking the drug.
1) What is the null hypothesis H0?
2) What is the alternative hypothesis Ha?
3) What is the p-value?
4) What is the conclusion for the t-test?
CHALLENGE ACTIVITY 6.4.1: Hypothesis test for the difference between two population means.
References
(*1) Pasman, WJ, et al. "The effect of different dosages of caffeine on endurance performance time." International Journal of Sports Medicine, 16(4):225-30, May 1995, DOI: 10.1055/s-2007-972996
df = 18 ¯ x1 ≠
¯ x2
μ1 = μ2
μ1 > μ2
μ1 < μ2
μ1 ≠ μ2
0.009
0.018
Reject H0
Fail to reject H0
6.5 Hypothesis test for the difference between two population proportions
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 38/42
The z-test can also be used to determine whether the proportions of two distinct populations are the same. When performing a hypothesis test involving the proportion of two distinct populations, the distribution of the z-test statistic is assumed to be
N 0, p̂(1 − p̂) 1 n1
+ 1 n2
The conditions that must be satis�ed are similar to those of the z-test for proportions involving two distinct populations. However, to satisfy the normality condition, all counts should be at least 5:
n1p̂1 ≥ 5 n1(1 − p̂1) ≥ 5 n2p̂2 ≥ 5 n2(1 − p̂2) ≥ 5
where p̂1 is the probability of success in the �rst sample, p̂2 is the probability of success in the second sample, p̂ is the overall probability of success when two samples are combined, n1 is the size of the �rst sample, and n2 is the size of the second sample.
Procedure 6.5.1: Hypothesis testing for two population proportions.
Given two randomly selected samples each taken from a distinct population
1. Set the null and alternative hypotheses
H0 : p1 = p2Ha : p1 < p2(left-tailed)Ha : p1 > p2(right-tailed)Ha : p1 ≠ p2(two-tailed)
where p1 and p2 are proportions from distinct populations.
2. Use statistical software to �nd the z-statistic
z = p̂1 − p̂2 − 0
p̂(1 − p̂) 1 n1
+ 1 n2
3. Use statistical software to �nd the p-value that corresponds to z. 4. Make a decision given a previously selected signi�cance level α, typically 0.05.
If the p-value is less than the signi�cance level, su�cient evidence exists to reject the null hypothesis H0 in favor of the alternative hypothesis Ha. If the p-value is greater than or equal to the signi�cance level, insu�cient evidence exists to reject the null hypothesis H0.
( √ ( ))
√ ( )
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 39/42
Example 6.5.1: Gender and voting.
The campaign team of a candidate running for statewide o�ce is concerned about the candidate's appeal to both genders. A recent survey of voting aged adults found that if the elections were held that day, 70 of 132 men and 63 of 105 women would vote for the candidate. Does su�cient evidence exist that suggest that the percentages of men and women who would vote for the candidate are different at the α = 0.05 signi�cance level?
Solution
The null hypothesis is that the proportion of men and the proportion of women who would vote for the candidate are the same. Since the question asks if the the percentages of men and women voting for the candidate are different, the hypothesis test is two-tailed with an alternative hypothesis that the population proportions are different. Mathematically,
H0 : p1 = p2Ha : p1 ≠ p2
where p1 is the population proportion of men who would vote for the candidate and p2 is the population proportion of women who would vote for the candidate.
The survey found that 70 of 132 men and 63 of 105 women would vote for the candidate. Thus,
p̂1 = men who would vote for the candidate
number of men in the survey =
70 132
≈ 0.530
p̂2 = women who would vote for the candidate
number of women in the survey =
63 105
= 0.600
p̂ = people who would vote for the candidate
number of people in the survey =
70 + 63 132 + 105
≈ 0.561
The test statistic is
z = p̂1 − p̂2 − 0
p̂(1 − p̂) 1 n1
+ 1 n2
= 0.530 − 0.600
0.561(1 − 0.561) 1
105 + 1
132
≈ − 1.079
The p-value is
p-value = P(z ≤ − 1.079 or z ≥ 1.079) ≈ 0.280
√ ( ) √ ( )
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 40/42
Since the p-value is greater than the signi�cance level (0.280 > 0.05), insu�cient evidence exists to suggest that population proportions for men and women who would vote for the candidate are different.
Example 6.5.2: Adverse reaction to drugs.
A medical researcher tests two types of drugs that are designed to slow the progression of a disease reaction. In a random sample of patients taking drug 2, 21 out of 30 people developed an adverse rea proportion of patients taking drug 1 who develop an adverse reaction is greater than that of patients
Solution
The null hypothesis is that the proportion of patients developing an adverse reaction is the same for proportion of patients developing an adverse reaction to drug 1 is greater than that of patients develo
H0 : p1 = p2Ha : p
In the study, 18 of 25 people taking drug 1 and 21 of 30 people taking drug 2 developed an adverse rea
p̂1 = people taking drug 1 who developed an adverse reaction
number of people taking drug 1 =
18 25
= 0.72p̂2 = people taking drug 2 who d
number of peo
The test statistic is
z = p̂1 − p̂2 − 0
p̂(1 − p̂) 1 n1
+ 1 n2
= 0.
0.709(
The p-value is P(z ≥ 0.16) ≈ 0.435.
Since the p-value is greater than the signi�cance level (0.435 > 0.01), insu�cient evidence exist sugge greater than that of patients taking drug 2.
√ ( ) √
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 41/42
PARTICIPATION ACTIVITY 6.5.1: Effectiveness of a vaccine.
10, 000 individuals are divided evenly into two groups. The treatment group is given a vaccine and the control group is given a placebo. 95 of the 5, 000 individuals in the treatment group developed a disease. 125 of the 5, 000 individuals in the control group developed a particular disease. A research team wants to determine whether the vaccine is effective in decreasing the incidence of disease. Does su�cient evidence exist to conclude that the proportion of developing a disease in individuals given the vaccine is less than that of individuals given a placebo?
1) What is the proportion of individuals in the treatment group that developed the disease? Type as: #.###
2) What is the proportion of individuals in the control group that developed the disease? Type as: #.###
3) What is the proportion of individuals in the overall group that developed the disease? Type as: #.###
4) What is the standard error estimate? Type as: #.####
5) What is the z-score? Type as: #.###
Check Show answer
Check Show answer
Check Show answer
Check Show answer
Check Show answer
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
2/3/2021 QNT/275T: Statistics for Decision Making home
https://learn.zybooks.com/zybook/QNT_275T_54402574/chapter/6/print 42/42
6) What is the p-value? Type as: #.###
7) Should the null hypothesis that the proportion of individuals taking the drug who develop the disease is the same as that of individuals not taking the drug be rejected at the α = 0.05 signi�cance level using the output below? Type as: yes or no
CHALLENGE ACTIVITY 6.5.1: Hypothesis test for the difference between two population proportions.
Check S o a s e
Check Show answer
Check Show answer
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574
©zyBooks 02/03/21 13:14 922949 Julio Romero
QNT_275T_54402574