In: Statistics and Probability
1 26.5
1 28.7
1 25.1
1 29.1
1 27.2
2 31.2
2 28.3
2 30.8
2 27.9
2 29.6
3 27.9
3 25.1
3 28.5
3 24.2
3 26.5
4 30.8
4 29.6
4 32.4
4 31.7
4 32.8
Q1:
• Test for equal variations using the Bartlett test.
Calculating the value of the test statistic
o Finding critical (tabular) values
o Determine the area rejecting the null hypothesis
the decision
Conclusion
Answer:
Bratlett test - using R studio:
Bartlett Test of Homogeneity of Variances
Description
Performs Bartlett's test of the null that the variances in each of
the groups (samples) are the same.
## S3 method for class 'formula'
bartlett.test(formula, data, subset, na.action, ...)
######## Excel data ##########
1 | 26.5 |
1 | 28.7 |
1 | 25.1 |
1 | 29.1 |
1 | 27.2 |
2 | 31.2 |
2 | 28.3 |
2 | 30.8 |
2 | 27.9 |
2 | 29.6 |
3 | 27.9 |
3 | 25.1 |
3 | 28.5 |
3 | 24.2 |
3 | 26.5 |
4 | 30.8 |
4 | 29.6 |
4 | 32.4 |
4 | 31.7 |
4 | 32.8 |
############## Excel data ends ##############
R-codes:
# Read Excel file saved in CSV format
Bdata=read.csv(file.choose(),header = F)
# Conduct Bartlett Test
bartlett.test(V2~V1,Bdata)
#######Test output #######
Bartlett test of homogeneity of variances
data: V2 by V1
Bartlett's K-squared = 0.46564, df = 3, p-value = 0.9264
###########################
Bartlett Test of Homogeneity of Variances
Null hypothesis : Ho : Variance is the same for all 4 groups
Alternative hypothesis : H1 : Variance is the NOT same for all 4 groups
i) Value of statistic : 0.46564
ii) Critical value: Look at below Chi-square table with degrees of freedom=4-1=3, and alpha=0.05
Critical value = 7.815
iii) Area rejecting the null hypothesis is Statistic value > 7.815 ( critical value)
iv) Decision: Since Value of statistic = 0.46564 < Critical value = 7.815 ==> Accept Ho
v) Conclusion: Variance is the same for all 4 groups