In: Statistics and Probability
Favorite Drink
Pumpkin juice Butterbeer Firewhisky Elven Wine
81 |
131 |
59 |
29 |
46 % |
41 % |
11 % |
2 % |
Observed Valuesn =300
Expected Proportions
Answer the questions labeled "Question 3 part 1" in the Word document using this information.
Question 3 part 2: A researcher wants to know whether there is any relationship between a person’s preferred type of magic (light, neutral, or dark) and the type of animal they chose as their familiar (owl, cat, or rat). To investigate this, she takes a sample of n =250) people and records how many people fall into each of the categories. The goal of the study is to test whether there was any relationship between the two variables. Assume all assumptions are met. Do all hypothesis testing for this part of question 3 using α =0.05. (See table below for sample data.)
Observed Frequencies
Preferred Animal Familiar
Owl Cat Rat
57 |
20 |
41 |
19 |
23 |
18 |
31 |
22 |
19 |
Light magic118
Type of magic preferred Neutral magic60
Dark magic72
if we have given the observed frequencies and expected frequencies and also categorical variables the best test statistic willbe Chi Square test
3(1) Here we need to test the goodness of fit means how far is the observed frequency fit to the population or expected frequency
We will for the null hypotheis Ho: There is no significant differnece between the Aurors and the normal population.
H1: There is a sgnificant differnce between the Aurors and the normal population
The test statistic will be used as Chi square where =
The calculation will be done in the below table
Oi is the given observed frequency and Ei we need to calculate from the % given multiplied by 300 willl give each Ei
From that we have the value of = 132.72 and the degree of freedom for a Chi square will be (c-1) (r-1) where r is the row and c is the column.
We have 4 columns and 1 row so we can take is as 4-1 = 3 df= 3
From the p value calculator for p= .00001 at significant level of
so if we have a p vlaue which is lower than the significance level we eed to reject the null hypothesis.
Here the null hypothesis says that there is no difference between the Aurors and the normal population in prefence of drinks if we rejct this we need to accpet the null hypothesis that there is a differenc in the preference of Aurors .
3(2) This is a problem of Test of independence using Chi square
The null hypothesis will be Ho : There is no relation between the the person's preferred type of magic and their familiar animal they choose
So the Alternate hypothesis becomes H1: There is some relation between the persons preferred type of magic anf the amilar animal they choose
The test statistic will be used as Chi square where =
The calculation will be done in the below table
Here we have given a sample size of 250
But not given the Ei or any values
So we find Ei using the formaul = row total x column total /Grand total for each item if we take first row first column cell we take firs column total x first row total / grand total here grand total is 250
WE have the value of = 11.41 degree of fredom = 3-1x3-1= 2x2=4 the significance level given is = 0.05
So the p value will be p = 0.0223 < 0.05 so here also we rejct the null hypothesis of there is no relation between the two criteria and accept the hypothesis that there is some relation
Hence we can conlclude that there is some relation between the preferred magic type and the familiar animal they choose