Chapter 7 - Statistical Inference
Chapter 7 - Statistical Inference
and Decisions
Third Edition
Chapter 7
Statistical
Inference
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 1
Statistical Inference
• Statistical inference focuses on drawing
conclusions about populations from samples.
• Statistical inference includes estimation of population
parameters and hypothesis testing, which involves
drawing conclusions about the value of the parameters of
one or more populations.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 2
Hypothesis Testing
• Hypothesis testing involves drawing inferences about two
contrasting propositions (each called a hypothesis)
relating to the value of one or more population parameters.
– Null hypothesis: describes an existing theory
– Alternative hypothesis: the complement of
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 3
Example 7.1: A Legal Analogy for
Hypothesis Testing
• In the U.S. legal system, a defendant is innocent
until proven guilty.
– Innocent
– Guilty
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 4
Hypothesis Testing Procedure
Steps in conducting a hypothesis test:
1. Identify the population parameter and formulate
the hypotheses to test.
2. Select a level of significance (the risk of
drawing an incorrect conclusion).
3. Determine the decision rule on which to base a
conclusion.
4. Collect data and calculate a test statistic.
5. Apply the decision rule and draw a conclusion.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 5
One-Sample Hypothesis Tests
• Three types of one sample tests:
1.
2.
3.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 6
Determining the Proper Form of
Hypotheses
• Hypothesis testing always assumes that is true and
uses sample data to determine whether is more likely
to be true.
– Statistically, we cannot “prove” that is true; we can only fail to
reject it.
• Rejecting the null hypothesis provides strong evidence (in
a statistical sense) that the null hypothesis is not true and
that the alternative hypothesis is true.
• Therefore, what we wish to provide evidence for
statistically should be identified as the alternative
hypothesis.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 7
Example 7.2: Formulating a One-
Sample Test of Hypothesis
• CadSoft receives calls for technical support. In the past,
the average response time has been at least 25 minutes. It
believes the average response time can be reduced to less
than 25 minutes.
– If the new information system makes a difference, then, data
should be able to confirm that the mean response time is less
than 25 minutes; this defines the alternative hypothesis,
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 8
Understanding Potential Errors in
Hypothesis Testing
• Hypothesis testing can result in one of four different
outcomes:
1. is true and the test correctly fails to reject
2. is false and the test correctly rejects
3. is true and the test incorrectly rejects
(called Type I error)
4. is false and the test incorrectly fails to reject
(called Type II error)
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 9
Terminology
• The probability of making a Type I error
– If the true mean is 15, then the sample mean will most
likely be less than 25, leading us to reject
– If the true mean is 24, then the sample mean may or
may not be less than 25, and we would have a higher
chance of failing to reject
• The further away the true mean is from the hypothesized
value, the smaller the value of β.
• Generally, as α decreases, β increases.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 11
Improving the Power of the Test
• We would like the power of the test to be high
(equivalently, we would like the probability of a Type II
error to be low) to allow us to make a valid conclusion.
• The power of the test is sensitive to the sample size; small
sample sizes generally result in a low value of 1 − β.
• The power of the test can be increased by taking larger
samples, which enable us to detect small differences
between the sample statistics and population parameters
with more accuracy.
• If you choose a small level of significance, you should try
to compensate by having a large sample size.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 12
Selecting the Test Statistic
• The decision to reject or fail to reject a null hypothesis is
based on computing a test statistic from the sample data.
• The test statistic used depends on the type of hypothesis
test.
– Test statistics for one-sample hypothesis tests for means:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 13
Example 7.4: Computing the Test
Statistic
• In the CadSoft example, sample data for 44 customers
revealed a mean response time of 21.91 minutes and a
sample standard deviation of 19.49 minutes.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 14
Drawing a Conclusion
• The conclusion to reject or fail to reject is based on
comparing the value of the test statistic to a “critical value”
from the sampling distribution of the test statistic when the
null hypothesis is true and the chosen level of significance,
α.
– The sampling distribution of the test statistic is usually the normal
distribution, t-distribution, or some other well-known distribution.
• The critical value divides the sampling distribution into two
parts, a rejection region and a non-rejection region. If the
test statistic falls into the rejection region, we reject the null
hypothesis; otherwise, we fail to reject it.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 15
Rejection Regions
H0 : parameter ≥ constant H0 : parameter ≤ constant
H1 : parameter < constant H1 : parameter > constant
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 16
Example 7.5: Finding the Critical
Value and Drawing a Conclusion
• In the CadSoft example, use α = 0.05.
–
–
–
– t = −1.05
– Critical value
– For a lower-tailed test, use -1.68
– t = −1.05 does not fall in the rejection region.
– Fail to reject
Even though the sample mean of 21.91 is
well below 25, we have too much sampling
error to conclude the that the true
population mean is less than 25 minutes.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 17
Two-Tailed Hypothesis Test for the
Mean
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 18
Example 7.6: Conducting a Two-Tailed
Hypothesis Test for the Mean
• Excel file Vacation Survey
• Test whether the average age of respondents is equal to 35.
– I don’t have the software to
change: 38.677 should be
– 38.678 in the line below and in
the formula for t
• n = 34; sample mean = 38.677; sample standard deviation = 7.858.
• Test statistic:
• Critical value
• Reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 19
p-Values
• A p-value (observed significance level) is the
probability of obtaining a test statistic value equal to
or more extreme than that obtained from the sample
data when the null hypothesis is true.
• An alternative approach to Step 3 of a hypothesis
test uses the p-value rather than the critical value:
Reject if the p-value < α
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 20
Finding p-Values When s is Known
• For a lower one-tailed test, the p-value is the probability to
the left of the test statistic t in the t-distribution, and is found
using the Excel function:
NORM.S.DIST(z, TRUE).
• For an upper one-tailed test, the p-value is the probability to
the right of the test statistic t, and is found using the Excel
function:
1 - NORM.S.DIST(z, TRUE)
• For a two-tailed test, the p-value is found using the Excel
function:
2*(1 - NORM.S.DIST(ABS(z), TRUE)
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 21
Finding p-Values When s is Unknown
• For a lower one-tailed test, the p-value is the probability to
the left of the test statistic t in the t-distribution, and is found
using the Excel function:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 22
Example 7.7: Using p-Values
• In the CadSoft example, the p-value is the left tail area of
the observed test statistic, t = −1.05.
– p-value
– Do not reject because the
• For the Vacation Survey two-tailed hypothesis test
in Example 7.6, the p-value for this test is
– p-value
– Reject because 0.010 < 0.05
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 23
One-Sample Tests for Proportions
• Test statistic:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 24
Example 7.8: One-Sample Test for the
Proportion
• CadSoft sampled 44 customers and asked them to rate the
overall quality of a software package. Sample data
revealed that 35 respondents (a proportion of
thought the software was very good or excellent. In the
past, this proportion has averaged about 75%. Is there
sufficient evidence to conclude that this satisfaction
measure has significantly exceeded 75% using a
significance level of 0.05?
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 25
Example 7.8 Continued
• Hypotheses:
–
–
• Test statistic:
• Critical value
• p-value
• Do not reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 26
Confidence Intervals and Hypothesis
Tests – Two-Tailed Tests
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 27
Confidence Intervals and Hypothesis
Tests – One-Tailed Tests
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 28
Excel Templates
• The Excel file One Sample Hypothesis Tests provides
template worksheets for conducting hypothesis tests for
means and proportions. One example:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 29
Two-Sample Hypothesis Tests (1 of 3)
• Lower-tailed test
–
–
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 30
Two-Sample Hypothesis Tests (2 of 3)
• Upper-tailed test
–
–
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 31
Two-Sample Hypothesis Tests (3 of 3)
• Two-tailed test
–
–
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 32
Excel Analysis Toolpak Procedures
for Two-Sample Hypothesis Tests
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 33
Two-Sample Tests for Difference in
Means
• Forms of the hypothesis test:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 34
Example 7.9: Comparing Supplier
Performance
• Purchase Orders database
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 35
Selecting the Proper Excel Procedure
• Population variances are known:
– z-Test: Two-Sample for Means
• Population variances are unknown and assumed
unequal:
– t-Test: Two-Sample Assuming Unequal Variances
• Population variances are unknown but assumed equal:
– t-Test: Two-Sample Assuming Equal Variances
• These tools calculate the test statistic, the p-value for
both a one-tail and two-tail test, and the critical values for
one-tail and two-tail tests.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 36
Interpreting Excel Output
• If the test statistic is negative, the one-tailed p-value is
the correct p-value for a lower-tail test; however, for an
upper-tail test, you must subtract this number from 1.0 to
get the correct p-value.
• If the test statistic is nonnegative (positive or zero), then
the p-value in the output is the correct p-value for an
upper-tail test; but for a lower-tail test, you must subtract
this number from 1.0 to get the correct p-value.
• For a lower-tail test, you must change the sign of the one-
tailed critical value.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 37
Example 7.10: Testing the Hypotheses
for Supplier Lead-Time Performance
• t-Test: Two-Sample Assuming Unequal Variances
– Variable 1 Range: Alum Sheeting data
– Variable 2 Range: Durrable Products data
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 38
Example 7.10 Continued
• Results
– Rule 2: If the test statistic is nonnegative (positive or
zero), then the p-value in the output is the correct p-value
for an upper-tail test.
t = 3.83
Critical value = 1.81
p-value = 0.00166
Reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 39
Two-Sample Test for Means with
Paired Samples
• In many situations, data from two samples are naturally
paired or matched.
• When paired samples are used, a paired t-test is more
accurate than assuming that the data come from independent
populations.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 41
Example 7.11 Continued
• Results:
• t = −10.91
• t is smaller than the
lower critical value
• p-value
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 42
Two-Sample Test for Equality of
Variances
• Test for equality of variances between two samples using
a new type of test, the F-test.
– To use this test, we must assume that both samples are drawn
from normal populations.
• Hypotheses:
• F-test statistic:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 44
Conducting the F-Test
• Although the hypothesis test is really a two-tailed test, we
will simplify it as an upper-tailed, one-tailed test to make it
easy to use tables of the F-distribution and interpret the
results of the Excel tool.
– We do this by ensuring that when we compute F, we take the ratio
of the larger sample variance to the smaller sample variance.
• Find the critical value of the F-distribution, and
then we reject the null hypothesis if the F-test statistic
exceeds the critical value.
• Note that we are using to find the critical value, not α.
This is because we are using only the upper tail information
on which to base our conclusion.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 45
Example 7.12: Applying the F-Test for
Equality of Variances
• Determine whether the variance of lead times is the same
for Alum Sheeting and Durrable Products in the Purchase
Orders data.
– The variance of the lead times for Alum Sheeting is larger than the
variance for Durable Products, so this is assigned to Variable 1.
F = 3.47
Critical value = 3.607
P-value = 0.029
Reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 46
Analysis of Variance (ANOVA)
• Used to compare the means of two or more population
groups.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 47
Example 7.13: Difference in Insurance
Survey Data
• Determine whether any significant differences exist in satisfaction
among individuals with different levels of education.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 49
Example 7.14 Continued
• Results
– F = 3.92
– Fcrit = 3.47
–
– p-value = 0.0356
– Reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 50
Assumptions of ANOVA
• The m groups or factor levels being studied
represent populations whose outcome measures
1. are randomly and independently obtained,
2. are normally distributed, and
3. have equal variances.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 51
Chi-Square Test for Independence
• Test for independence of two categorical variables.
– two categorical variables are independent
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 52
Example 7.15: Independence and
Marketing Strategy
• Energy Drink Survey data. A key marketing question is whether the
proportion of males who prefer a particular brand is no different from
the proportion of females.
– If gender and brand preference are indeed independent, we would expect that
about the same proportion of the sample of female students would also prefer
brand 1.
– If they are not independent, then advertising should be targeted differently to males
and females, whereas if they are independent, it would not matter.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 53
Chi-Square Test Calculations (1 of 3)
• Step 1: Using a cross-tabulation of the data, compute the
expected frequency if the two variables are independent.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 54
Example 7.16: Computing Expected
Frequencies
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 55
Chi-Square Test Calculations (2 of 3)
• Step 2: Compute a test statistic, called a chi-square
statistic, which is the sum of the squares of the differences
between observed frequency, and expected frequency,
divided by the expected frequency in each cell:
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 56
Chi-Square Distribution
• The sampling distribution of is a special distribution
called the chi-square distribution.
– The chi-square distribution is characterized by degrees of
freedom.
– Table 3 in Appendix A
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 57
Chi-Square Test Calculations (3 of 3)
• Step 3: Compare the chi-square statistic for the level of
significance α to the critical value from a chi-square distribution
with degrees of freedom, where r and c are the
number of rows and columns in the cross-tabulation table,
respectively.
– The Excel function returns the
value of that has a right-tail area equal to probability for a specified
degree of freedom.
– By setting probability equal to the level of significance, we can obtain the
critical value for the hypothesis test.
– The Excel function
computes the p-value for the chi-square test.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 58
Example 7.17: Conducting the
Chi-Square Test
• Test statistic = 6.49
•
• Critical value =
• p-value =
• Reject
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 59
Cautions in Using the Chi-Square
Test
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 60
Example 7.18: Violations of Chi-
Square Assumptions
• A survey of 100 students at a university queried their
beverage preferences at a local coffee shop.
Of the 16 cells, five, or over 30%, have frequencies smaller than 5. Four
of them are in the Cappuccino, Latte, and Mocha columns; these can be
aggregated into one column called Hot Specialty beverages.
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 61
Example 7.18 Continued
Copyright © 2020, 2016, 2013 Pearson Education, Inc. All Rights Reserved Slide - 62