Download Document

Document related concepts

History of statistics wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Degrees of freedom (statistics) wikipedia , lookup

Foundations of statistics wikipedia , lookup

Psychometrics wikipedia , lookup

Taylor's law wikipedia , lookup

Misuse of statistics wikipedia , lookup

Omnibus test wikipedia , lookup

Analysis of variance wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Figure 17.1 Relationship of Hypothesis Testing Related to
Differences to the Previous Chapter and the Marketing Research
Process
Focus of This
Chapter
Relationship to
Previous Chapters
• Hypothesis
Testing Related
to Differences
• Research
Questions and
Hypothesis
(Chapter 2)
• Means
• Proportions
• Data Analysis
Strategy
(Chapter 15)
• General
Procedure of
Hypothesis
Testing
(Chapter 16)
Relationship to Marketing
Research Process
Problem Definition
Approach to Problem
Research Design
Field Work
Data Preparation
and Analysis
Report Preparation
and Presentation
Figure 17.2 Hypothesis Testing Related to Differences: An Overview
Hypothesis Testing Related to Differences
Figs 17.3-17.5
Be a DM!
Be an MR!
t-Tests
Table 17.117.5
Testing Hypothesis for More Than Two Samples
Tables 17.617.8
Application to Contemporary Issues
International
Technology
Ethics
What Would You Do?
Experiential Learning
Opening Vignette
Hypothesis Testing Related to
Differences
• Parametric tests assume that the variables of
interest are measured on at least an interval scale.
• These tests can be further classified based on
whether one or two or more samples are involved.
• The samples are independent if they are drawn
randomly from different populations. For the
purpose of analysis, data pertaining to different
groups of respondents, e.g., males and females, are
generally treated as independent samples.
• The samples are paired when the data for the two
samples relate to the same group of respondents.
Figure 17.3 Hypothesis Tests Related to Differences
Tests of Differences
One Sample
Means
Proportions
Two Independent
Samples
Means
Proportions
Paired
Samples
Means
Proportions
More Than
Two Samples
Means
Proportions
The t Distribution
• The t statistic assumes that the variable is normally
distributed and the mean is known (or assumed to be
known) and the population variance is estimated from
the sample.
• Assume that the random variable X is normally
distributed, with mean  and unknown population
variance s2, which is estimated by the sample variance
s 2.
• Then, t = (X - )/sX is t distributed with n - 1 degrees
of freedom.
• The t distribution is similar to the normal distribution in
appearance. Both distributions are bell-shaped and
symmetric. As the number of degrees of freedom
increases, the t distribution approaches the normal
distribution.
Hypothesis Testing Using the
t Statistic
1.
Formulate the null (H0) and the alternative (H1)
hypotheses.
2.
Select the appropriate formula for the t statistic.
3.
Select a significance level, a, for testing H0.
Typically, the 0.05 level is selected.
4.
Take one or two samples and compute the
mean and standard deviation for each sample.
5.
Calculate the t statistic assuming H0 is true.
Hypothesis Testing Using the
t Statistic
6.
Calculate the degrees of freedom and estimate the
probability of getting a more extreme value of the
statistic from Table 4 (Alternatively, calculate the critical
value of the t statistic).
7.
If the probability computed in step 5 is smaller than the
significance level selected in step 2, reject H0. If the
probability is larger, do not reject H0. (Alternatively, if
the value of the calculated t statistic in step 4 is larger
than the critical value determined in step 5, reject H0. If
the calculated value is smaller than the critical value, do
not reject H0). Failure to reject H0 does not necessarily
imply that H0 is true. It only means that the true state is
not significantly different than that assumed by H0.
8.
Express the conclusion reached by the t test in terms of
the marketing research problem.
Figure 17.4 Conducting t-Tests
Formulate H0 and H1
Select Appropriate t-Test
Choose Level of Significance, α
Collect Data and Calculate Test Statistic
a) Determine Probability
Associated with Test
Statistic (TSCAL)
a) Compare with Level of
Significance, α
b) Determine Critical
Value of Test Statistic
TSCR
b) Determine if TSCR falls
into (Non) Rejection Region
Reject or Do Not Reject H0
Draw Marketing Research Conclusion
One Sample t Test
 <7.0
H1:  > 7.0
H 0:
t = (X - )/sX
S S
x
S  1.6
x
n
20 = 1.6/4.472 = 0.358
t = (7.9 – 7.0)/0.358 = 0.9/0.358 = 2.514
One Sample t Test
The degrees of freedom for the t statistic to test the
hypothesis about one mean are n - 1. In this case,
n - 1 = 20 – 1, or 19. From Table 4 in the Statistical
Appendix, the probability of getting a more extreme value
than 2.514 is less than 0.05 (Alternatively, the critical t
value for 19 degrees of freedom and a significance level
of 0.05 is 1.7291, which is less than the calculated value).
Hence, the null hypothesis is rejected.
One Sample z Test
Note that if the population standard deviation was assumed
to be known as 1.5, a z test would be appropriate.
z = (X - )/sX
where
s  1.5 20
x
= 1.5/4.472 = 0.335
and
z = (7.9 – 7.0)/0.335 = 0.9/0.335 = 2.687
One Sample z Test
• From Table 2 in the Statistical Appendix, the
probability of getting a more extreme value of z than
2.687 is less than 0.05. (Alternatively, the critical z
value for a one-tailed test and a significance level of
0.05 is 1.645, which is less than the calculated value.)
Therefore, the null hypothesis is rejected, reaching
the same conclusion arrived at earlier by the t test.
• The procedure for testing a null hypothesis with
respect to a proportion was illustrated in Chapter 16
when we introduced hypothesis testing.
TABLE 17.1
Preference for Disney Before and After Visiting the Resort
No.
Sample
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
1.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
Preference for Disney
Before
After
7.00
9.00
6.00
8.00
5.00
8.00
6.00
9.00
4.00
7.00
6.00
8.00
5.00
7.00
4.00
7.00
7.00
9.00
5.00
7.00
3.00
7.00
4.00
8.00
4.00
7.00
3.00
6.00
6.00
8.00
5.00
8.00
4.00
9.00
3.00
6.00
3.00
7.00
5.00
9.00
TABLE 17.2
One Sample t-test
Number
Variable
of Cases
Mean
SD SE of Mean
-------------------------------------------------------------------------VAR00002
10
5.5000
1.080
.342
-------------------------------------------------------------------------Test Value = 5
Mean
95% CI
Difference Lower
Upper
t-value
df 2-Tail Sig
--------------------------------------------------------------------------.50
-.273
1.273
1.46
9
.177
---------------------------------------------------------------------------
Two Independent Samples: Means
• In this case the hypotheses take the following form.
H : 
0
1
H :  
1
1
2
2
• If both populations are found to have the same variance,
a pooled variance estimate is computed from the two
sample variances as follows:
n1
2
s

(X
i 1
i1
-
n2
X ) + (X
n + n -2
2
1
1
i 1
2
i2
-
2
s1 +
2
(n2-1) s2
(n - 1)
X ) or s2 = 1
n1 + n2 -2
2
2
Two Independent Samples: Means
The standard deviation of the test statistic can be
estimated as:
sX 1 - X 2 =
s 2 (n1 + n1 )
1
2
The appropriate value of t can be calculated as:
(X 1 -X 2) - (1 - 2)
t=
sX 1 - X 2
The degrees of freedom in this case are (n1 + n2 -2).
Two Independent Samples: F Test
An F test of sample variance may be performed if
it is not known whether the two populations have
equal variance. In this case, the hypotheses are:
H0: s12 = s22
H1:s12s 22
Two Independent Samples: F Statistic
s12
F(n1-1),(n2-1) =
s22
where
n1
n2
n1-1
n2-1
s 12
s 22
= size of sample 1
= size of sample 2
= degrees of freedom for sample 1
= degrees of freedom for sample 2
= sample variance for sample 1
= sample variance for sample 2
Using the data of Table 17.1, we determine whether teenagers
have a different preference than adults. A two-independentsamples t test was conducted. The results are presented in
Table 17.3.
TABLE 17.3
t-tests for Independent Samples
Number
Variable
of Cases
Mean
SD
----------------------------------------------------------------------VAR00002
VAR00001 1
10
5.5000
1.080
VAR00001 2
10
4.0000
1.054
-----------------------------------------------------------------------
SE of Mean
.342
.333
Mean Difference = 1.5000
Levene's Test for Equality of Variances: F= .150 P= .703
t-test for Equality of Means
Variances
t-value
df
2-Tail Sig
SE of Diff
------------------------------------------------------------------------------Equal
3.14
18
.006
.477
Unequal
3.14
17.99
.006
.477
-------------------------------------------------------------------------------
95%
CI for Diff
(.497, 2.503)
.497, 2.503)
Figure 17.5 Calculating the Critical Value
of the Test Statistic: TSCR for Two-Tailed
and One-Tailed Tests
α/2
α/2
α
Two Independent Samples
Proportions
The case involving proportions for two independent
samples is illustrated using the data of Table 17.4, which
gives the number of users and nonusers of jeans in the US
and Hong Kong. The null and alternative hypotheses are:
H0 :
H1:
1 = 2
1  2
A Z test is used as in testing the proportion for one sample.
However, in this case the test statistic is given by:
-P
P
Z
S
1
P1- p 2
2
Two Independent Samples
Proportions
In the test statistic, the numerator is the difference between the
proportions in the two samples, P1 and P2. The denominator is
the standard error of the difference in the two proportions and is
given by
1
1
S P1- p 2  P(1 - P) + 
 n1 n2 
where
n1P1 + n2P2
P =
n1 + n2
Two Independent Samples:
Proportions
A significance level of a =
 0.05 is selected. Given the data of
Table 17.4, the test statistic can be calculated as:
P -P
1
2
= 0.8 -0.6 = 0.2
P = (200 x 0.8+200 x 0.6)/(200+200) = 0.7
S
P1- p 2
=
0.7 x0.3[
1
1
+
]
200 200
Z = 0.2/0.04583 = 4.36
= 0.04583
Two Independent Samples
Proportions
Given a two-tail test, the area to the right of the critical
value is 0.025. Hence, the critical value of the test
statistic is 1.96. Since the calculated value exceeds the
critical value, the null hypothesis is rejected. Thus, the
proportion of users (0.8 for the US and 0.6 for HK) is
significantly different for the two samples.
Table 17.4
Comparing the Proportions of Jeans Users for the USA and
Hong Kong
Usage of Jeans
Sample
Users
Non-Users
Row
Totals
USA
160
40
200
Hong Kong
120
80
200
Column
Totals
280
120
Paired Samples
The difference in these cases is examined by a paired samples t
test. To compute t for paired samples, the paired difference
variable, denoted by D, is formed and its mean and variance
calculated. Then the t statistic is computed. The degrees of
freedom are n - 1, where n is the number of pairs. The relevant
formulas are:
H0 :  D = 0
H1:  D  0
D - D
tn-1 = s
D
n
continued…
Paired Samples
n
where,
D=
1
i=
Di
n
n
=1
i
sD =
SD 
S
(Di - D)2
n-1
D
n
For the data in Table 17.1, a paired t test could be used to
determine if the teenagers differed in their preference before
and after visiting Disney park. The resulting output is shown in
Table 17.5.
TABLE 17.5
t-tests for Paired Samples
Number
2-tail
Variable
of pairs
Corr Sig
Mean
SD SE of Mean
---------------------------------------------------------------------------------------------------------VAR00002
5.5000
1.080
.342
10
.881 .001
VAR00003
7.9000
.876
.277
----------------------------------------------------------------------------------------------------------
Paired Differences
Mean
SD SE of Mean
t-value
df
2-tail Sig
----------------------------------------------------------------------------------------------------------2.4000
.516
.163
-14.70
9
.000
95% CI (-2.769, -2.031)
Analysis of Variance
• Analysis of variance (ANOVA) is used as a test of
means for two or more populations. The null
hypothesis, typically, is that all means are equal.
• Analysis of variance must have a dependent variable
that is metric (measured using an interval or ratio scale).
• There must also be one or more independent variables
that are all categorical (nonmetric). Categorical
independent variables are also called factors.
One-Way Analysis of Variance
• A particular combination of factor levels, or
categories, is called a treatment.
• One-way analysis of variance involves only one
categorical variable, or a single factor. In oneway analysis of variance, a treatment is the same
as a factor level.
One-way Analysis of Variance
Marketing researchers are often interested in
examining the differences in the mean values of the
dependent variable for several categories of a single
independent variable or factor. For example:
• Do the various segments differ in terms of their
volume of product consumption?
• Do the brand evaluations of groups exposed to
different commercials vary?
• What is the effect of consumers' familiarity with the
store (measured as high, medium, and low) on
preference for the store?
Statistics Associated with One-way
Analysis of Variance
• eta2 (2). The strength of the effects of X
(independent variable or factor) on Y (dependent
variable) is measured by eta2 (2). The value of 2
varies between 0 and 1.
• F statistic. The null hypothesis that the category
means are equal in the population is tested by an F
statistic based on the ratio of mean square related
to X and mean square related to error.
• Mean square. This is the sum of squares divided
by the appropriate degrees of freedom.
Statistics Associated with One-way
Analysis of Variance
• SSbetween. Also denoted as SSx, this is the variation
in Y related to the variation in the means of the
categories of X. This represents variation between
the categories of X, or the portion of the sum of
squares in Y related to X.
• SSwithin. Also referred to as SSerror, this is the
variation in Y due to the variation within each of the
categories of X. This variation is not accounted for
by X.
• SSy. This is the total variation in Y.
Conducting One-way ANOVA
Identify the Dependent and Independent Variables
Decompose the Total Variation
Measure the Effects
Test the Significance
Interpret the Results
Conducting One-way Analysis of Variance
Decompose the Total Variation
The total variation in Y, denoted by SSy, can be
decomposed into two components:
SSy = SSbetween + SSwithin
where the subscripts between and within refer to the
categories of X. SSbetween is the variation in Y related to
the variation in the means of the categories of X. For this
reason, SSbetween is also denoted as SSx. SSwithin is the
variation in Y related to the variation within each category
of X. SSwithin is not accounted for by X. Therefore it is
referred to as SSerror.
Decompose the Total Variation
SSy = SSx + SSerror
where
N
SSy = (Yi -Y 2)
i =1
c
SSx = n (Yj -Y)2
j =1
c

j
i
SSerror=
n
(Yi j -Yj )2
Yi = individual observation
j = mean for category j
= mean over the whole sample, or grand mean
Yij = i th observation in the j th category
Measure the Effects
In analysis of variance, we estimate two measures of
variation: within groups (SSwithin) and between groups
(SSbetween). Thus, by comparing the Y variance
estimates based on between-group and within-group
variation, we can test the null hypothesis.
The strength of the effects of X on Y are measured as
follows:
2
 = SSx/SSy = (SSy - SSerror)/SSy
The value of  2 varies between 0 and 1.
Test Significance
In one-way analysis of variance, the interest lies in testing the null
hypothesis that the category means are equal in the population.
H0: µ1 = µ2 = µ3 = ........... = µc
Under the null hypothesis, SSx and SSerror come from the same source
of variation. In other words, the estimate of the population variance of
Y,
S
2
y
= SSx/(c - 1)
= Mean square due to X
= MSx
or
S
2
y
= SSerror/(N - c)
= Mean square due to error
= MSerror
Test Significance
The null hypothesis may be tested by the F statistic
based on the ratio between these two estimates:
SS x /(c - 1)
MS x
F=
=
SS error/(N - c) MS error
This statistic follows the F distribution, with (c - 1) and
(N - c) degrees of freedom (df).
Interpret the Results
• If the null hypothesis of equal category means is not
rejected, then the independent variable does not
have a significant effect on the dependent variable.
• On the other hand, if the null hypothesis is rejected,
then the effect of the independent variable is
significant.
• A comparison of the category mean values will
indicate the nature of the effect of the independent
variable.
Illustrative Applications of One-way
Analysis of Variance
We illustrate the concepts discussed in this chapter
using the data presented in Table 17.6.
The supermarket is attempting to determine the
effect of in-store advertising (X) on sales (Y).
The null hypothesis is that the category means are
equal:
H0: µ1 = µ2 = µ3.
TABLE 17.6
EFFECT OF IN-STORE PROMOTION ON SALES
Store
No.
Level of In-store Promotion
High
Medium
Low
Normalized Sales
1
10
6
5
2
9
4
6
3
10
7
5
4
8
3
2
5
8
5
2
Calculation of Means
• Category means j :
45/5
=9
• Grand mean:
25/5
=5
20/5
=4
= (45 + 25 + 20)/15 = 6
Sums of Squares
SSy
= (10 – 6)2 + (9 – 6) 2 + (10 – 6) 2 + (8 – 6) 2 + (8 – 6) 2
+ (6 – 6) 2 + (4 – 6) 2 + (7 – 6) 2 + (3 – 6) 2 + (5 – 6) 2
+ (5 – 6) 2 + (6 – 6) 2 + (5 – 6) 2 + (2 – 6) 2 + (2 – 6) 2
= 16 + 9 + 16 + 4 + 4
+0+4+1+9+1
+ 1 + 0 + 1 + 16 + 16
= 98
Sums of Squares
SSx
= 5(9 – 6) 2 + 5(5 – 6) 2 + 5(4 – 6) 2
= 45 + 5 + 20
= 70
Sums of Squares
SSerror
= (10 – 9) 2 + (9 – 9) 2 + (10 – 9) 2 + (8 – 9) 2 + (8 – 9) 2
+ (6 – 5) 2 + (4 – 5) 2 + (7 – 5) 2 + (3 – 5) 2 + (5 – 5) 2
+ (5 – 4) 2 + (6 – 4) 2 + (5 – 4) 2 + (2 – 4) 2 + (2 – 4) 2
=1+0+1+1+1
+1+1+4+4+0
+1+4+1+4+4
= 28
Sums of Squares
It can be verified that
SSy = SSx + SSerror
as follows:
98 = 70 + 28
Measurement of Effects
The strength of the effects of X on Y are
measured as follows:
= SSx/SSy
2
= 70/98
= 0.714
Testing the Null Hypothesis
SS x /(c - 1)
F=
= MS X
SS error/(N - c) MS error
F=
70/(3-1)
28/(15-3)
= 15.0
Testing the Null Hypothesis
• From Table 5 in the Appendix of Statistical Tables, we see
that for 2 and 12 degrees of freedom and a  , the
critical value of F is 3.89. Since the calculated value of F
is greater than the critical value, we reject the null
hypothesis.
• This one-way ANOVA was also conducted using statistical
software and the output is shown in Table 17.7.
TABLE 17.7
One-way Analysis of Variance
Source of Variation
Sum of
Squares
DF
Mean
Square
F
Sig
of F
Main Effects
In-store promotion
70.00
70.00
2
2
35.00
35.00
15.00
15.00
.001
.001
Explained
70.00
2
35.00
15.00
.001
Residual
28.00
12
2.33
Total
98.00
14
7.00
TABLE 17.8
A SUMMARY OF HYPOTHESIS TESTING
Sample
One Sample
Means
Proportions
Two Independent Samples
Means
Proportions
Test/Commets
t test, if variance is unknown
z test, if variance is known
z test
Two-group t test
F test for equality of variances
z test
Chi-square test
Paired Samples
Means
Paired t test
Proportions
Chi-square test
More Than Two Samples
Means
One-way analysis of variance
Proportions
Chi-square test
SPSS Windows
• The main program in SPSS is FREQUENCIES. It
produces a table of frequency counts, percentages,
and cumulative percentages for the values of each
variable. It gives all of the associated statistics.
• If the data are interval scaled and only the
summary statistics are desired, the
DESCRIPTIVES procedure can be used.
• The EXPLORE procedure produces summary
statistics and graphical displays, either for all of the
cases or separately for groups of cases. Mean,
median, variance, standard deviation, minimum,
maximum, and range are some of the statistics that
can be calculated.
SPSS Windows
To select these procedures click:
Analyze>Descriptive Statistics>Frequencies
Analyze>Descriptive Statistics>Descriptives
Analyze>Descriptive Statistics>Explore
The major cross-tabulation program is CROSSTABS. This program
will display the cross-classification tables and provide cell counts,
row and column percentages, the chi-square test for significance,
and all the measures of the strength of the association that have
been discussed.
To select these procedures click:
Analyze>Descriptive Statistics>Crosstabs
SPSS Windows
The major program for conducting parametric tests in SPSS is
COMPARE MEANS. This program can be used to conduct t
tests on one sample or independent or paired samples. To
select these procedures using SPSS for Windows click:
Analyze>Compare Means>Means …
Analyze>Compare Means>One-Sample T Test …
Analyze>Compare Means>Independent-Samples T Test …
Analyze>Compare Means>Paired-Samples T Test …
SPSS Windows
One-way ANOVA can be efficiently performed using the
program COMPARE MEANS and then One-way
ANOVA. To select this procedure using SPSS for
Windows click:
Analyze>Compare Means>One-Way ANOVA …
Figure 17.6 Other Computer Programs for t-tests
SAS
In SAS, the program TTEST can be used to conduct t-tests on
independent as well as paired samples
MINITAB
Parametric test available in MINITAB in descriptive stat function are
z-test mean, t-test of the mean, and two-sample t-test.
EXCEL
The available parametric tests in EXCEL and other spreadsheets
include the t-test; paired sample for means; t-test: two independent
samples assuming equal variances; t-test: two independent
samples assuming unequal variances, z-test: two samples for
means, and F test two samples for variances.
Figure 17.7 Other Computer Programs for ANOVA
SAS
The main program for performing analysis of variance is ANOVA. This
program can handle data from a wide variety of experimental designs. For
more complex designs, the more general GLM procedure can be used. While
GLM can also be used for analyzing simple designs, it is not as efficient as
ANOVA for such models.
MINITAB
Analysis of Variance can be assessed from the Stats>ANOVA function. This
function performs one way ANOVA and can also handle more complex
designs. In order to compute the mean and standard deviation, the cross-tab
function must be used. To obtain F and p values, use the balanced ANOVA.
EXCEL
Both a one-way ANOVA and more complex designs can be analyzed under the
Tools>Data Analysis function.