In: Statistics and Probability
A botanist measures the sepal widths (in cm) of 150 iris flowers, 50 of type iris setosa, 50 of type iris virginica, and 50 of type iris versicolor. The data is noted below. Of interest is whether sepal width differs, on average, among the three iris types. You may assume that, for each iris type, the sample may be treated as a simple random sample.
a. What are the null and alternative hypotheses?
b. What is the value of the test statistic?
c. What is the approximate p-value?
d. State and verify (using plots or descriptive statistics) the additional two assumptions required for the p-value in c) to be valid.
e. Using a significance level of = 0.05, state your conclusions in the language of the problem.
Sepal Width and Class = 3.5 Iris-setosa 3 Iris-setosa 3.2 Iris-setosa 3.1 Iris-setosa 3.6 Iris-setosa 3.9 Iris-setosa 3.4 Iris-setosa 3.4 Iris-setosa 2.9 Iris-setosa 3.1 Iris-setosa 3.7 Iris-setosa 3.4 Iris-setosa 3 Iris-setosa 3 Iris-setosa 4 Iris-setosa 4.4 Iris-setosa 3.9 Iris-setosa 3.5 Iris-setosa 3.8 Iris-setosa 3.8 Iris-setosa 3.4 Iris-setosa 3.7 Iris-setosa 3.6 Iris-setosa 3.3 Iris-setosa 3.4 Iris-setosa 3 Iris-setosa 3.4 Iris-setosa 3.5 Iris-setosa 3.4 Iris-setosa 3.2 Iris-setosa 3.1 Iris-setosa 3.4 Iris-setosa 4.1 Iris-setosa 4.2 Iris-setosa 3.1 Iris-setosa 3.2 Iris-setosa 3.5 Iris-setosa 3.1 Iris-setosa 3 Iris-setosa 3.4 Iris-setosa 3.5 Iris-setosa 2.3 Iris-setosa 3.2 Iris-setosa 3.5 Iris-setosa 3.8 Iris-setosa 3 Iris-setosa 3.8 Iris-setosa 3.2 Iris-setosa 3.7 Iris-setosa 3.3 Iris-setosa 3.2 Iris-versicolor 3.2 Iris-versicolor 3.1 Iris-versicolor 2.3 Iris-versicolor 2.8 Iris-versicolor 2.8 Iris-versicolor 3.3 Iris-versicolor 2.4 Iris-versicolor 2.9 Iris-versicolor 2.7 Iris-versicolor 2 Iris-versicolor 3 Iris-versicolor 2.2 Iris-versicolor 2.9 Iris-versicolor 2.9 Iris-versicolor 3.1 Iris-versicolor 3 Iris-versicolor 2.7 Iris-versicolor 2.2 Iris-versicolor 2.5 Iris-versicolor 3.2 Iris-versicolor 2.8 Iris-versicolor 2.5 Iris-versicolor 2.8 Iris-versicolor 2.9 Iris-versicolor 3 Iris-versicolor 2.8 Iris-versicolor 3 Iris-versicolor 2.9 Iris-versicolor 2.6 Iris-versicolor 2.4 Iris-versicolor 2.4 Iris-versicolor 2.7 Iris-versicolor 2.7 Iris-versicolor 3 Iris-versicolor 3.4 Iris-versicolor 3.1 Iris-versicolor 2.3 Iris-versicolor 3 Iris-versicolor 2.5 Iris-versicolor 2.6 Iris-versicolor 3 Iris-versicolor 2.6 Iris-versicolor 2.3 Iris-versicolor 2.7 Iris-versicolor 3 Iris-versicolor 2.9 Iris-versicolor 2.9 Iris-versicolor 2.5 Iris-versicolor 2.8 Iris-versicolor 3.3 Iris-virginica 2.7 Iris-virginica 3 Iris-virginica 2.9 Iris-virginica 3 Iris-virginica 3 Iris-virginica 2.5 Iris-virginica 2.9 Iris-virginica 2.5 Iris-virginica 3.6 Iris-virginica 3.2 Iris-virginica 2.7 Iris-virginica 3 Iris-virginica 2.5 Iris-virginica 2.8 Iris-virginica 3.2 Iris-virginica 3 Iris-virginica 3.8 Iris-virginica 2.6 Iris-virginica 2.2 Iris-virginica 3.2 Iris-virginica 2.8 Iris-virginica 2.8 Iris-virginica 2.7 Iris-virginica 3.3 Iris-virginica 3.2 Iris-virginica 2.8 Iris-virginica 3 Iris-virginica 2.8 Iris-virginica 3 Iris-virginica 2.8 Iris-virginica 3.8 Iris-virginica 2.8 Iris-virginica 2.8 Iris-virginica 2.6 Iris-virginica 3 Iris-virginica 3.4 Iris-virginica 3.1 Iris-virginica 3 Iris-virginica 3.1 Iris-virginica 3.1 Iris-virginica 3.1 Iris-virginica 2.7 Iris-virginica 3.2 Iris-virginica 3.3 Iris-virginica 3 Iris-virginica 2.5 Iris-virginica 3 Iris-virginica 3.4 Iris-virginica 3 Iris-virginica
Given data set in tabular form:
Species | SepalWidthCm |
Iris-setosa | 3.5 |
Iris-setosa | 3 |
Iris-setosa | 3.2 |
Iris-setosa | 3.1 |
Iris-setosa | 3.6 |
Iris-setosa | 3.9 |
Iris-setosa | 3.4 |
Iris-setosa | 3.4 |
Iris-setosa | 2.9 |
Iris-setosa | 3.1 |
Iris-setosa | 3.7 |
Iris-setosa | 3.4 |
Iris-setosa | 3 |
Iris-setosa | 3 |
Iris-setosa | 4 |
Iris-setosa | 4.4 |
Iris-setosa | 3.9 |
Iris-setosa | 3.5 |
Iris-setosa | 3.8 |
Iris-setosa | 3.8 |
Iris-setosa | 3.4 |
Iris-setosa | 3.7 |
Iris-setosa | 3.6 |
Iris-setosa | 3.3 |
Iris-setosa | 3.4 |
Iris-setosa | 3 |
Iris-setosa | 3.4 |
Iris-setosa | 3.5 |
Iris-setosa | 3.4 |
Iris-setosa | 3.2 |
Iris-setosa | 3.1 |
Iris-setosa | 3.4 |
Iris-setosa | 4.1 |
Iris-setosa | 4.2 |
Iris-setosa | 3.1 |
Iris-setosa | 3.2 |
Iris-setosa | 3.5 |
Iris-setosa | 3.1 |
Iris-setosa | 3 |
Iris-setosa | 3.4 |
Iris-setosa | 3.5 |
Iris-setosa | 2.3 |
Iris-setosa | 3.2 |
Iris-setosa | 3.5 |
Iris-setosa | 3.8 |
Iris-setosa | 3 |
Iris-setosa | 3.8 |
Iris-setosa | 3.2 |
Iris-setosa | 3.7 |
Iris-setosa | 3.3 |
Iris-versicolor | 3.2 |
Iris-versicolor | 3.2 |
Iris-versicolor | 3.1 |
Iris-versicolor | 2.3 |
Iris-versicolor | 2.8 |
Iris-versicolor | 2.8 |
Iris-versicolor | 3.3 |
Iris-versicolor | 2.4 |
Iris-versicolor | 2.9 |
Iris-versicolor | 2.7 |
Iris-versicolor | 2 |
Iris-versicolor | 3 |
Iris-versicolor | 2.2 |
Iris-versicolor | 2.9 |
Iris-versicolor | 2.9 |
Iris-versicolor | 3.1 |
Iris-versicolor | 3 |
Iris-versicolor | 2.7 |
Iris-versicolor | 2.2 |
Iris-versicolor | 2.5 |
Iris-versicolor | 3.2 |
Iris-versicolor | 2.8 |
Iris-versicolor | 2.5 |
Iris-versicolor | 2.8 |
Iris-versicolor | 2.9 |
Iris-versicolor | 3 |
Iris-versicolor | 2.8 |
Iris-versicolor | 3 |
Iris-versicolor | 2.9 |
Iris-versicolor | 2.6 |
Iris-versicolor | 2.4 |
Iris-versicolor | 2.4 |
Iris-versicolor | 2.7 |
Iris-versicolor | 2.7 |
Iris-versicolor | 3 |
Iris-versicolor | 3.4 |
Iris-versicolor | 3.1 |
Iris-versicolor | 2.3 |
Iris-versicolor | 3 |
Iris-versicolor | 2.5 |
Iris-versicolor | 2.6 |
Iris-versicolor | 3 |
Iris-versicolor | 2.6 |
Iris-versicolor | 2.3 |
Iris-versicolor | 2.7 |
Iris-versicolor | 3 |
Iris-versicolor | 2.9 |
Iris-versicolor | 2.9 |
Iris-versicolor | 2.5 |
Iris-versicolor | 2.8 |
Iris-virginica | 3.3 |
Iris-virginica | 2.7 |
Iris-virginica | 3 |
Iris-virginica | 2.9 |
Iris-virginica | 3 |
Iris-virginica | 3 |
Iris-virginica | 2.5 |
Iris-virginica | 2.9 |
Iris-virginica | 2.5 |
Iris-virginica | 3.6 |
Iris-virginica | 3.2 |
Iris-virginica | 2.7 |
Iris-virginica | 3 |
Iris-virginica | 2.5 |
Iris-virginica | 2.8 |
Iris-virginica | 3.2 |
Iris-virginica | 3 |
Iris-virginica | 3.8 |
Iris-virginica | 2.6 |
Iris-virginica | 2.2 |
Iris-virginica | 3.2 |
Iris-virginica | 2.8 |
Iris-virginica | 2.8 |
Iris-virginica | 2.7 |
Iris-virginica | 3.3 |
Iris-virginica | 3.2 |
Iris-virginica | 2.8 |
Iris-virginica | 3 |
Iris-virginica | 2.8 |
Iris-virginica | 3 |
Iris-virginica | 2.8 |
Iris-virginica | 3.8 |
Iris-virginica | 2.8 |
Iris-virginica | 2.8 |
Iris-virginica | 2.6 |
Iris-virginica | 3 |
Iris-virginica | 3.4 |
Iris-virginica | 3.1 |
Iris-virginica | 3 |
Iris-virginica | 3.1 |
Iris-virginica | 3.1 |
Iris-virginica | 3.1 |
Iris-virginica | 2.7 |
Iris-virginica | 3.2 |
Iris-virginica | 3.3 |
Iris-virginica | 3 |
Iris-virginica | 2.5 |
Iris-virginica | 3 |
Iris-virginica | 3.4 |
Iris-virginica | 3 |
Now, finding the mean of widht for 3 types.
s = 3.418
ve = 2.77
vi = 2.872
1.)
Null Hyptheses:
Ho: On an average the means of all three groups are significanlty same.
s = ve = vi
Alternate Hypotheses:
Ha: On an average the means of all three groups are significanlty different.
svevi
2.)
To check the above Hypotheses, we need to perform One way ANOVA and calculate F statistic.
The Summary table of ANOVA is given below for alpha = 0.05 and degree of freedom = 3-1 = 2:
Summary of Data | ||||
Treatments | ||||
Setosa | Verisoclor | Virginica | Total | |
N | 50 | 50 | 50 | 150 |
?X | 170.9 | 138.5 | 148.7 | 458.1 |
Mean | 3.418 | 2.77 | 2.974 | 3.054 |
?X2 | 591.25 | 388.47 | 447.33 | 1427.05 |
Std.Dev. | 0.381 | 0.3138 | 0.3225 | 0.4336 |
Result details are given below:
Result Details | ||||
Source | SS | df | MS | |
Between-treatments | 10.9776 | 2 | 5.4888 | F = 47.36446 |
Within-treatments | 17.035 | 147 | 0.1159 | |
Total | 28.0126 | 149 |
F-statistic Value = 47.36
3.) p-value for above test statistic is:
f-ratio value = 47.36
p = 0.0001
4.) There are 2 assumptions to check:
-> whether data for 3 categories follows normal distribution.
-> standard deviation for 3 categories are equal.
Checking the first one:
To check the normal distribution we will check for Histograms of 3 categories.
-> Setosa:
From the above graph we can see that there are some outliers in setosa, but graph is almost normal.
-> Versiocolor
Although not perfect, but data for Versicolor is also near to normal state.
-> Virginica:
For virginica the data looks normal.
We can ssume that data for 3 types follows normal distribution approximately and continue with ANOVA test.
Checking second Assumption:
The standrad devition of 3 groups are:
0.38, 0.31, 0.32 |
These are almost same. So our second assumotion is also satisfied.
5.) given alpha = 0.05
our p-value = 0.0001
since p < 0.05
We can reject Null Hypotheses and say that on an average mean sepal width of 3 categories are statistically different.