Chapter 7
Chapter 7
Chapter 7
Statistical Inference
Chapter 8
Trendlines and Regression Analysis
Statistical Inference
Statistical inference (thống kê suy luận) focuses on drawing conclusions about populations from
samples.
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.
Hypothesis testing always assumes that H0 is true and uses sample data to determine whether H1
is more likely to be true.
◦ Statistically, we cannot “prove” that H0 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.
4. H0 is false and the test incorrectly fails to reject H0 (called Type II error)
Terminology
◦ The value of α can be controlled. Common values are 0.01, 0.05, or 0.10.
= P(rejecting H0 | H0 is false).
◦ The value of β cannot be specified in advance and depends on the value of the
(unknown) population parameter.
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 - b.
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.
The decision to reject or fail to reject a null hypothesis is based on computing a test statistic
from the sample data.
Drawing a Conclusion
The conclusion to reject or fail to reject H0 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, a.
◦ 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.
Rejection Regions
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.
Testing the relationship between two independent samples is very common in market research.
Each of these hypotheses aim at evaluating whether two populations (e.g., heavy and light
users), represented by samples, are significantly different in terms of certain key variables
(e.g., satisfaction ratings).
Lower-tailed test
◦ This test seeks evidence that the difference between population parameter (1) and
population parameter (2) is less than some value, D0.
◦ When D0 = 0, the test simply seeks to conclude whether population parameter (1) is
smaller than population parameter (2).
Upper-tailed test
◦ This test seeks evidence that the difference between population parameter (1) and
population parameter (2) is greater than some value, D0.
◦ When D0 = 0, the test simply seeks to conclude whether population parameter (1) is
larger than population parameter (2).
Two-tailed test
◦ This test seeks evidence that the difference between the population parameters is
equal to D0.
◦ When D0 = 0, we are seeking evidence that population parameter (1) differs from
population parameter (2).
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.
Only rarely are the population variances known; also, it is often difficult to justify the
assumption that the variances of each population are equal.
Therefore, in most practical situations, we use the t-test: Two-Sample Assuming Unequal
Variances
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.
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.
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:
F-Distribution
The F-distribution has two degrees of freedom, one associated with the numerator of the F-
statistic, n1 - 1, and one associated with the denominator of the F-statistic, n2 - 1.
Table 4, Appendix A provides only upper-tail critical values, and the distribution is not symmetric.
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 Fa/2,df1,df2 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 a/2 to find the critical value, not a. This is because we are using only the
upper tail information on which to base our conclusion.
ANOVA derives its name from the fact that we are analyzing variances in the data.
In probability theory and statistics, variance is the expectation of the squared deviation of a
random variable from its population mean or sample mean.
Example of samples from two populations with the same mean but different variances. The red
population has mean 100 and variance 100 (SD=10) while the blue population has mean 100
and variance 2500 (SD=50).