Professional Documents
Culture Documents
STAT 1013 Statistics: Week 13 AND 14
STAT 1013 Statistics: Week 13 AND 14
STAT 1013 Statistics: Week 13 AND 14
STATISTICS
Week 13 AND 14
Chi – Square and ANOVA
LEARNING OUTCOMES
The observed frequencies will always differ from the expected frequencies
due to sampling error. But are these differences significant? The chi-square
goodness of fit test will enable one to determine the answer.
Formula for the Chi-Square Test
Formula
With
df = degrees of freedom = number of categories – 1
O = observed frequencies
E = expected frequencies
Chi-Square Test
Assumptions for the Chi-Square Test:
The data obtained from a random sample must be independent.
The expected frequency for each category must be at least 5.
Before computing the test statistic, the hypotheses must be stated first.
Consumers show no preference.
Consumers show a preference.
Chi-Square Test
STEP 5 : Decision
The decision is to reject the null hypothesis, since .
STEP 6: Conclusion
Therefore, there is enough evidence to reject the claim that the customers
show no preference for the colors of shirts.
When there is a perfect agreement between the observed and expected
values, . Also, can never be negative. Finally, the test is always right-tailed.
EXAMPLE 2 : Chi - Square
The dean of student affairs of a college wishes to test the claim that the distribution of
students is as follows: 40% nursing (N); 25% business (B); 15% computer science (CS);
10% engineering (E); 5% humanities (H); and 5% education (Ed). Last semester, the
program enrollment was distributed as shown below. At α=0.05 is the distribution of
students the same as hypothesized?
Major Number
Nursing 72
Business 53
Computer Science 32
Engineering 20
Humanities 16
Education 7
EXAMPLE 2 : Chi - Square
STEP 1 : State the hypotheses.
Ho: The distribution of students is as follows: 40% nursing (N); 25%
business (B); 15% computer science (CS); 10% engineering (E); 5%
humanities (H); and 5% education (Ed).
Ha: The distribution is not the same as stated in the null hypothesis.
STEP 2: Level of Significance
α = 0.05
STEP 3 : Determine the critical value
Using α = 0.05 and df = 6 – 1 = 5
Hence, the critical value is 11.071.
EXAMPLE 3: Chi - Square
STEP 4 : Compute the chi-square statistic
Since there are 200 students in the study, the expected values are
computed as follows:
EXAMPLE 1 : Chi - Square
STEP 5 : Decision
Since 5.61<11.071, the decision is not to reject the null hypothesis.
STEP 6: Conclusion
Therefore, the percentages are not significantly different than those given in
the null hypothesis.
TEST FOR INDEPENDENCE
Place the expected values in the corresponding cells along with the
observed values.
EXAMPLE 3 : Chi - Square
A study is being conducted to determine whether there is a relationship
between jogging and blood pressure. A random sample of 210 subjects is
selected, and they are classified as shown in the table that follows.
Use .
Blood pressure
Jogging status Low moderate High Total
Joggers 34 57 21 112
Non – joggers 15 63 20 98
Total 49 120 41 210
EXAMPLE 3 : Chi - Square
EXAMPLE 1 : Chi - Square
STEP 5 : Decision
Since Reject .
STEP 6: Conclusion
Therefore, the blood pressure of a person depends on whether he jogs or
not.
ANALYSIS OF VARIANCE
The degrees of freedom for the F test are :
where k is the number of groups
where n is the sum of the sample sizes of the groups
.
To calculate MSB and MSW, first compute the between – samples sum
of squares denoted by SSB and the within-samples sum of the squares
denoted by SSW.
The sum of SSB and SSW is called the total sum of the squares and it is
denoted by SST. That is,
ANALYSIS OF VARIANCE
The values of SSB and SSW are calculated using the following formulas:
The between – samples sum of squares, denoted by SSB,
where:
= sum of sample in the ith group
= number of samples in the ith group
The within-samples sum of squares, denoted by SSW,
ANALYSIS OF VARIANCE
The variance between samples MSB and the variance within samples MSW
are calculated using the following formulas.
The MSB and MSW are calculated as
Consider the following data obtained for two samples selected at random
from two populations that are independent and normally distributed with
equal variances. Calculate the F test statistic.
Sample 1 Sample 2
32 27
26 37
31 33
29 36
27 38
34 31
EXAMPLE 1 : Analysis of Variance
Calculate , square all values included in the two samples and then add.
Thus,
Substitute all the values in the formula for SSB and SSW.
EXAMPLE 1 : Analysis of Variance
Therefore,
The value of F test statistic is
EXAMPLE 1 : Analysis of Variance
STEP 6: Conclusion
Hence, the two populations have equal means.