Chai Square ANOVA 1
Chai Square ANOVA 1
F-Distribution
Multinomial Experiments
A multinomial experiment is a probability experiment consisting of
a fixed number of trials in which there are more than two possible
outcomes for each independent trial. (Unlike the binomial
experiment in which there were only two possible outcomes.)
Example:
A researcher claims that the distribution of favorite pizza toppings
among teenagers is as shown below.
Topping Frequency, f
Each outcome is Cheese 41% The probability for
classified into Pepperoni 25% each possible outcome
categories. Sausage 15% is fixed.
Mushrooms 10%
Onions 9%
Larson & Farber, Elementary Statistics: Picturing the World, 3e 2
Chi-Square Goodness-of-Fit Test
A Chi-Square Goodness-of-Fit Test is used to test whether a frequency
distribution fits an expected distribution.
To calculate the test statistic for the chi-square goodness-of-fit test, the
observed frequencies and the expected frequencies are used.
The observed frequency O of a category is the frequency for the category observed in the sample data.
The expected frequency E of a category is the calculated frequency for the category. Expected frequencies are obtained assuming the specified (or hypothesized) distribution. The expected frequency for
the ith category is
Ei = npi
where n is the number of trials (the sample size) and pi is the assumed probability of the ith category.
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 6
Chi-Square Goodness-of-Fit Test
Performing a Chi-Square Goodness-of-Fit Test
In Words In Symbols
6. Calculate the test statistic. 2 (O E )2
χ
E
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 9
Chi-Square Goodness-of-Fit Test
Example continued:
Topping Observed Expected
Rejection Frequency Frequency
region
Cheese 78 82
0.01 Pepperoni 52 50
Sausage 30 30
X2
Mushrooms 25 20
χ20 = 13.277 Onions 15 18
2 (O E )2 (78 82)2 (52 50)2 (30 30)2 (25 20)2 (15 18)2
χ
E 82 50 30 20 18
2.025
Fail to reject H0.
There is not enough evidence at the 1% level to reject the
surveyor’s claim.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 10
Independence
Contingency Tables
An r c contingency table shows the observed frequencies for
two variables. The observed frequencies are arranged in r rows and
c columns. The intersection of a row and a column is called a cell.
Age
Gender 16 – 20 21 – 30 31 – 40 41 – 50 51 – 60 61 and older
Male 32 51 52 43 28 10
Female 13 22 33 21 10 6
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 14
Expected Frequency
Example continued:
Age
Gender 16 – 20 21 – 30 31 – 40 41 – 50 51 – 60 61 and Total
older
Male 32 51 52 43 28 10 216
Female 13 22 33 21 10 6 105
Total 45 73 85 64 38 16 321
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 18
Chi-Square Independence Test
Performing a Chi-Square Independence Test
In Words In Symbols
6. Calculate the test statistic. 2 (O E )2
χ
E
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 21
Chi-Square Independence Test
Example continued: O E O–E (O – E)2 (O E )2
Rejection
E
32 30.28 1.72 2.9584 0.0977
region
51 49.12 1.88 3.5344 0.072
0.05 52 57.20 5.2 27.04 0.4727
43 43.07 0.07 0.0049 0.0001
X2 28 25.57 2.43 5.9049 0.2309
10 10.77 0.77 0.5929 0.0551
χ20 = 11.071
13 14.72 1.72 2.9584 0.201
(O E )2 22 23.88 1.88 3.5344 0.148
2
χ 2.84 33 27.80 5.2 27.04 0.9727
E
21 20.93 0.07 0.0049 0.0002
Fail to reject H0. 10 12.43 2.43 5.9049 0.4751
6 5.23 0.77 0.5929 0.1134
s 12
F 2
is called an F-distribution.
s2
There are several properties of this distribution.
1 2 3 4 5 6
1 161.4 199.5 215.7 224.6 230.2 234.0
2 18.51 19.00 19.16 19.25 19.30 19.33
27 4.21 3.35 2.96 2.73 2.57 2.46
28 4.20 3.34 2.95 2.71 2.56 2.45
29 4.18 3.33 2.93 2.70 2.55 2.43
1 2 3 4 5 6
1 161.4 199.5 215.7 224.6 230.2 234.0
2 18.51 19.00 19.16 19.25 19.30 19.33
3 10.13 9.55 9.28 9.12 9.01 8.94
4 7.71 6.94 6.59 6.39 6.26 6.16
5 6.61 5.79 5.41 5.19 5.05 4.95
6 5.99 5.14 4.76 4.53 4.39 4.28
The critical
7 value5.59
is F0 =4.74
4.53. 4.35 4.12 3.97 3.87
Larson & Farber, Elementary Statistics: Picturing the World, 3e 28
Two-Sample F-Test for Variances
Two-Sample F-Test for Variances
A two-sample F-test is used to compare two population variances
when σ 12aasample
n d σ 22 is randomly selected from each population.
The populations must be independent and normally distributed.
The test statistic is
s 12
F 2
s2
where s 12 a n d s 22 represent the sample variances with
2 2
sThe
1 s 2.
degrees of freedom for the numerator is d.f.N = n1 – 1 and
the degrees of freedom for the denominator is d.f.D = n2 – 1, where
n1 is the size of the sample having
2
variance and n2 is the size of
s1
the sample having variance
s 22.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 29
Two-Sample F-Test for Variances
Using a Two-Sample F-Test to Compare σ 12 and σ 22
In Words In Symbols
1. Identify the claim. State the null and State H0 and Ha.
alternative hypotheses.
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 30
Two-Sample F-Test for Variances
Using a Two-Sample F-Test to Compare σ 12 and σ 22
In Words In Symbols
5. Determine the rejection region.
6. Calculate the test statistic. s 12
F 2
s2
1. The variance between samples MSB measures the differences related to the treatment given to each
sample and is sometimes called the mean square between.
2. The variance within samples MSW measures the differences related to entries within the same sample.
This variance, sometimes called the mean square within, is usually due to sampling error.
SS B
Between SSB d.f.N MS B MS B MSW
d.f.N
S SW
Within SSW d.f.D M SW
d.f.D
Continued.
Larson & Farber, Elementary Statistics: Picturing the World, 3e 43
Performing a One-Way ANOVA Test
Example continued:
H0: μ1 = μ2 = μ3 = μ4
Ha: At least one mean is different from the others. (Claim)
d.f.D = N – k = 20 – 4 = 16