Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Sheet1 strength design 5 design1 4 design1 6 design1 22 design1 3 design1 4 design1 5 design1 6 design1 7 design2 8 design2 10 design2 8 design2 9 design2 8 design2 9 d...

1 answer below »
Sheet1
    strength    design
    5    design1
    4    design1
    6    design1
    22    design1
    3    design1
    4    design1
    5    design1
    6    design1
    7    design2
    8    design2
    10    design2
    8    design2
    9    design2
    8    design2
    9    design2
    6    design2
    5    design3
    6    design3
    5    design3
    7    design3
    5    design3
    6    design3
    7    design3
    8    design3

anovaLogPhone
    e
ors    phone
    2    phone1
    1    phone1
    2    phone1
    3    phone1
    4    phone1
    3    phone1
    2    phone1
    1    phone1
    10    phone1
    6    phone2
    7    phone2
    8    phone2
    9    phone2
    8    phone2
    7    phone2
    8    phone2
    5    phone2
    7    phone2
    2    phone3
    3    phone3
    4    phone3
    3    phone3
    2    phone3
    3    phone3
    4    phone3
    5    phone3
    3    phone3

supplie
    strength    supplie
    30.5    A
    29.4    A
    31.3    A
    28.4    A
    29.8    A
    32.9    A
    29.3    A
    29.2    A
    29.3    A
    28.3    A
    22.6    B
    23.7    B
    19.6    B
    23.8    B
    27.1    B
    27.1    B
    25.3    B
    24.0    B
    21.2    B
    24.5    B
    27.7    C
    18.6    C
    20.8    C
    25.1    C
    17.7    C
    19.6    C
    24.1    C
    20.8    C
    24.7    C
    22.9    C
    21.5    D
    20.0    D
    21.1    D
    22.7    D
    16.0    D
    25.4    D
    19.9    D
    22.6    D
    17.5    D
    20.4    D
    20.6    E
    18.0    E
    19.0    E
    22.1    E
    13.2    E
    19.2    E
    24.0    E
    17.2    E
    19.9    E
    18.0    E

Statistics for Business and Economics 1
BUS 525: Quantitative Methods For Business Research

Content: ANOVA test and Kruskal Wallis test
1
ANOVA or Kruskal Wallis test
ANOVA stands for ANalysis Of VAriance.
This is a test to compare more than two means.
The name ANOVA is from, by analyzing variances of data, we can compare means.
ANOVA or Kruskal Wallis test
For ANVOA test, we use the term Factor, Factor level and Dependent variable.
Example1: If we like to study the effect of price ($10, $15, and $20) on sales of a product, then
Factor = Price
Factor level = $10, $15, and $20
Dependent variable = sales of a product
Note: This problem is to compare three means of sales based on three price levels.
ANOVA or Kruskal Wallis test
Example2: If we like to study the effect of design of golf balls (Design1, Design 2, Design 3 and Design 4) on flying distances (in yards) of balls, then
Factor = Design
Factor level = Design1, Design 2, Design 3 and Design 4
Dependent variable = flying distance in yard
Note: This problem is to compare four means of flying distances in yard based on four designs.
ANOVA or Kruskal Wallis test
Validity conditions to use ANOVA test
Each data is from a normal distribution (called normality condition)
Shapiro test can be done to check this condition
Number of Shapiro tests is same as number of factor levels.
First example, we need to do 3 Shapiro tests.
2nd example, we need to do 4 Shapiro tests.
H0: Data 1 is from a normal distribution
H1: Data 1 is not from a normal distribution
Variances of populations are same ( called homogeneity in variances condition)
Levene test can be done to check this condition.
Number of Levene test is only one regardless of number of factor levels.
H0: All variances of populations are same
H1: Not all variances of populations are same
5
ANOVA or Kruskal Wallis test
Procedures for ANOVA:
First, we need to check these two validity conditions.
If both normality condition checked by Shapiro test and homogeneity in variances condition checked by Levene test are satisfied, then ANOVA test can be used to compare means.
If both conditions are not met, then do log transformation and then check normality condition and homogeneity in variances condition again with log transformed data.
If both conditions using log transformed data are met, then ANOVA with log transformed data can be used to compare means of log transformed data
If both conditions with log transformed data are not met, ANOVA test can’t be used. Kruskal-Wallis test with original data can be used to compare medians.
ANOVA or Kruskal Wallis test
H0 and H1 for ANOVA test:
Example 1:
H0: All means of sales based on three price levels are same
(There is no effect of price on sales)
H1: Not all means of sales based on three price levels are same
(There is effect of price on sales)
Example 2:
H0: All means of flying distances of balls based on 4 designs are same
(There is no effect of design on flying distances)
H1: Not all means of flying distances of balls based on 4 designs are same
(There is effect of design on flying distances)
ANOVA or Kruskal Wallis test
Post ANOVA test:
If the conclusion of ANOVA test is “not rejecting H0”, then the implication of the ANOVA test is that there is no evidence that not all means of ………. are same. No post ANOVA test is required since there is no evidence that they are different. Right!
If the conclusion of ANOVA test is “rejecting H0”, then the implication is that there is evidence that not all means of ………. are same. So that a post ANOVA test should be done to see how they are different. Sensible?
A post ANOVA test that we could use is Tukey test.
Tukey test will be explained with examples.
ANOVA or Kruskal Wallis test
Kruskal and Wallis (KW) test, and its post test:
If ANOVA test can’t be done, KW test could be done.
H0 and H1 for KW test are:
H0: All medians of …………… are same
H1: Not all medians of ………….are same
If the conclusion of KW test is “not rejecting H0”, then the implication of the KW test is that there is no evidence that not all medians of ………. are same. No post KW test is required since there is no evidence that they are different.
If the conclusion of KW test is “rejecting H0”, then the implication is that there is evidence that not all medians of ………. are same. So that a post KW test should be done to see how they are different.
A post KW test that we could use is Dunn test. Dunn.test will be explained using examples.
ANOVA or Kruskal Wallis test
Example1: Please download data, anovaCatFood.xlsx in Bb. Then save it as catfood.csv in our class folder.
We like to study the effect of type of foods (kd (kidney), sp (shrimp), cl (chicken liver), sm (salmon) and bf (beef)) on weight gains in lb. of cats.
Factor = type of food
Factor level = kd, sp, cl, sm and bf
Thus, number of factor level = 5
Dependent variable = weight gains of cats in lb.
ANOVA or Kruskal Wallis test
Check the validity conditions: normality and homogeneity in variances
First, normality using shapiro test for each food.
Since there are 5 shapiro tests to do, just one set of H0 and H1 is enough.
H0: data is from a normal distribution
H1: data is not from a normal distribution
Then do the followings:
Output of levels are
Output of names
ANOVA or Kruskal Wallis test
Do shapiro test for each food.
Note that the square
acket [ ] extracts data from data
Since all p-values XXXXXXXXXX, 0.4439, 0.1558, 0.664, XXXXXXXXXXare larger than 0.05, do not reject H0 for all Shapiro tests. So that there is evidence that all data are from a normal distribution.
ANOVA or Kruskal Wallis test
Do Levene test for homogeneity in variances:
H0: All variances of 5 populations are same
H1: Not all variances of 5 populations are same
Levene test requires a package, car.
Then, please go to Packages menu on the lower right hand side window and check the mark for car package. You need to do this all the time.
If you could not install car package, see page 15 in the slide.

ANOVA or Kruskal Wallis test
Do Levene test for homogeneity in variances:
Output is
Since p-value XXXXXXXXXXis larger than 0.05, do not reject H0. So that there is no evidence that not all variances are same. Thus homogeneity of variances condition is met.
Now we know that two conditions (normality and homogeneity in variances) are met. So ANOVA test can be done.

P -value
ANOVA or Kruskal Wallis test
Do Levene test for homogeneity in variances:
H0: All variances of 5 populations are same
H1: Not all variances of 5 populations are same
If you could not install car package, install the following two alternatives:
DescTools or lawstat (case sensitive)
Make sure that you need to use the co
ect function name and syntax for each package.

ANOVA or Kruskal Wallis test
Do ANOVA test:
H0: All means of weight gains of 5 foods are equal
H1: Not all means of weight gains of 5 foods are equal
Outputs are
Since p-value (9.15e-10) is less than 0.05, reject H0. It implies that there is evidence that not all means of weight gains of 5 foods are equal. Thus we need to do a post ANOVA test, Tukey test to rank the means of 5 foods.

ANOVA or Kruskal Wallis test
Now let us do Tukey test:
Outputs are
Tukey test is multiple pairwise tests. Since there are 5 food types, there are 10 pairs. Can you see the 10 pairs? That is, there are 10 tests. First test is
H0: Mean weight gains of cl(Chicken Liver) = mean weight gains of bf (beef)
H1: Mean weight gains of cl (Chicken Liver) is not same as mean weight gains of bf (beef)
P-value for this test is XXXXXXXXXX.
p-values
ANOVA or Kruskal Wallis test
Outputs are
By looking at the outputs, we see that conclusions of three pairs (kidney-chicken liver, shrimp – chicken liver, and shrimp – kidney) have p-values larger than 0.05, that is, “not reject H0”. Rest pairs are “Reject H0”. Do you see that. Thus, implications of Tukey test is that
Kidney and Chicken liver are not different
Shrimp and Chicken liver are not different
Shrimp and Kidney are not different
Rest 7 pairs are different.
Using these outputs, we like to see the rankings of foods based on mean weight gains.
ANOVA or Kruskal Wallis test
To see the ranking, first find the sample mean of data of each food:
Outputs are
Thus ascending orders of sample means are
Beef < salmon < Chicken Liver < shrimp < kidney
Make sure that these are based on sample data. Our goal is that we like to see the rankings of means of populations, not means of sample data. To do that, we need to combine above sample order and Tukey outputs.
ANOVA or Kruskal Wallis test
Combing information:
First list the foods based on the ascending order.
Beef salmon Chicken Liver shrimp kidney
Second, put the underline for the pairs whose conclusion is “not rejecting H0”
Beef salmon Chicken Liver shrimp kidney
Next, make groups which are distinct
Beef salmon Chicken Liver shrimp kidney
There are three distinct groups: One for beef, second for salmon and third for Chicken Liver, shrimp and kidney.
        
ANOVA or Kruskal Wallis test
Beef salmon Chicken Liver shrimp kidney
Group XXXXXXXXXXGroup 2 XXXXXXXXXXGroup 3
Since there are three distinct groups, we can rank them.
Group 1 < Group 2 < Group 3
Thus, the final implications of Tukey test are that
Group 3 (Chicken liver, shrimp and kidney) has the highest mean of weight gains
Group 2 (salmon) is the next
Group 1 (beef) is the last one.
Also, we can’t rank among Chicken liver, shrimp and kidney based on this data.
(note that Do not say that they have same means. It is too strong statement which might be inco
ect. We just say that we can’t rank them. Do you get the idea!)
        
ANOVA or Kruskal Wallis test
More practice to interpret Tukey outputs using a makeup example:
If the ascending order of sample means is
    B < C < D < A
And if Tukey test says that conclusions of pairs (B - C, and D –A) are “not rejecting H0” and rest pairs are “rejecting H0”, then we can underlines like that:
    B    C     D    A
Thus we can circle like below:
    B    C     D    A
Thus there are two distinct groups:
Thus, the final implications are that
group (A and D) has higher means than group (B and C)
We can’t rank between A and D
We can’t rank between B and C
ANOVA or Kruskal Wallis test
One more practice to interpret Tukey outputs:
If the ascending order of sample means is
    B < C < D < A
And if Tukey test says that conclusions of pairs (B - C, C – D, and D –A) are “not rejecting H0” and rest pairs are “rejecting H0”, then we can underlines like that:
    B    C     D    A
Thus we can circle like below:
    B    C     D    A
Thus there is only one distinct group:
Thus, the final implications are that
We can’t rank among A, B, C, and D.
Do not say that they are same!
ANOVA or Kruskal Wallis test
Look at another example, using anovaLogCollege.xlsx
Please save it as anovaLogCollege.csv in our class folder.
Let us assume that we like to see the effect of college (college1, college2 and college3) on amounts of accidents.
Factor = college (or type of college)
Factor level = college1, college2,
Answered Same Day Nov 21, 2022

Solution

Mukesh answered on Nov 22 2022
51 Votes
1. Using phone.xlsx in Bb, we like to test the effect of type of phone on e
ors with 0.05 alpha. Do all tests to find the rankings of phones based on e
ors.
Since p-value of phone1 is 0.001743, we reject the null so that this data is not from a normal distribution. So the normality condition is not met. We do not have to do Levene test. Sensible?
Do log and do shapiro tests again
Since all p-values (0.3817, 0.3375, 0.2692) are larger than 0.05, log data are
from normal. So we need to do Levene test using log data
Levene test using log data
Since p-value (0.058) is larger than 0.05, log data are homogeneous in variances. We can do ANOVA using Log data
Since p-value (0.000105) is less than 0.05, reject H0. Thus, not all means are different. You need to do Tukey test.
By looking at the outputs, we see that conclusion of one pairs (phone1 and phone3) have p-values larger than 0.05, that is, “not reject H0”. Rest pairs are “Reject H0”. Do you see that. Thus, implications of Tukey test is that
phone1 and phone3 are not different rest2 pair are different
Using these outputs, we like to see the...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here