## anonymous one year ago Statistics/Probability questions... 1) How do I tell if the model accurately predicted the sales? 2) What is the "p" in this problem/what do I do with it? : "Assume p = 0.05" ___ I attached the full problem and a clearer version of what I think is called a 'Chi Squared Critical Values Chart.' ___ Could someone run me through how to do this problem?

1. anonymous

2. LynFran

you shd start by finding the degree of freedom do u know how to do that?

3. anonymous

No, I don't. I asked my proctor to help me, but he didn't know how either.

4. LynFran

ok there a formula for that (C-1)(R-1) where C represent the total # of column and R represent the total # of rows

5. anonymous

(12-1)(35-1)?

6. LynFran

no there 2 columns the expected and the observed ....and there 3 row.,vanilla, strawberry and chocolate

7. LynFran

correct now take away and then multiply out the brackets to get the df

8. anonymous

2

9. LynFran

correct the next step is to find the chi square value and there a formula for that also

10. LynFran

|dw:1435291295954:dw|

11. LynFran

so we plug in the respective values in the formula and add them up note: we do them separately i will start u will finish it ok

12. anonymous

Sounds good, thanks a bunch :)

13. LynFran

|dw:1435291759806:dw|

14. anonymous

6033 _____ ? 875

15. anonymous

^(fraction)

16. LynFran

yes but we usually take the decimal in statistics

17. LynFran

which is 6.894857 now this is ur chi square value

18. anonymous

what now? is this where that "p" comes in?

19. LynFran

now the want the p value so we take the degree of freedom which is 2 and at p=0.05 which i dont see on this chi square tables??

20. LynFran

im seeing 0.005 on the table not 0.05

21. LynFran

and it there twice the table have a fault

22. LynFran

u see it? im assuming that the first 0.005 suppose to be 0.05??

23. anonymous

Maybe it is supposed to be the 5th column?

24. LynFran

no actually there shdnt have the same p value on a chi square table

25. anonymous

You're the expert; I'm in Algebra II. My proctor didn't know why it was included, and couldn't help me with it because he didn't know how to do stats either. There wasn't even a review or notes or anything, just questions. :/

26. LynFran

im lookin at my chi square table and well the p value for 0.05 corresponds to the first 0.005 on your chi sq. table so lets used that 0k

27. anonymous

Sure thing

28. LynFran

29. LynFran

so |dw:1435293790254:dw|

30. LynFran

now we compare the 2 chi square value

31. anonymous

oh wait, so that was right? Because 6.83 > 5.99, the correct answer is either A or D?

32. LynFran

the answer shd be D because the p value was too low

33. LynFran

for the chi square

34. anonymous

Both A and D say x was too low

35. LynFran

ok u see what the difference between the two values?

36. anonymous

One says yes, and the other says no?

37. anonymous

referring to whether or not the model predicted the milkshake sales accurately

38. anonymous

but i don't know how to tell that from our data/if it should be yes or no

39. LynFran

and there a saying that goes like this....if the p-value is low H0 must go and if the p-value is high then h0 can fly

40. LynFran

ok the difference between the value is 0.84 can conclude D or A as the answer?

41. anonymous

I understand how to get 0.84 as the difference, but not how to tell if it is Yes or No

42. LynFran
43. LynFran

ok what we actually had to look at is if p>0.05 or p<0.05

44. anonymous

I thought it said p=0.05 though?

45. LynFran

yes but when we find the value we see if its greater ok lesser than 0.05

46. anonymous

..

47. LynFran

o no we were on the right track before i got mix up after watching that video that for critical value...so we do have to look at our 2 chi squared values to determine the answer

48. anonymous

49. LynFran

well the chi squared value is low and lets look at it this way the chi sq value doesnt equal our chi square value and once the chi squared values is too low then it says something about the test so i still think its D

50. LynFran

ok maybe if we get a second opionon an this it would be nice cause i really dont know how to explain the no it was to low part @SolomonZelman

51. anonymous

Thanks for all of your help so far @LynFran :)

52. LynFran

ok

53. LynFran

@jim_thompson5910

54. jim_thompson5910

LynFran you're using the right formula $\Large \chi^2 = \sum \frac{(O_i -E_i)^2}{E_i}$ $\Large \chi^2 = \frac{(O_1 -E_1)^2}{E_1}+\frac{(O_2 -E_2)^2}{E_2}+\frac{(O_3 -E_3)^2}{E_3}$ $\Large \chi^2 = \frac{(205-175)^2}{175}+\frac{(114-125)^2}{125}+\frac{(264-250)^2}{250}$ $\Large \chi^2 = 6.894857$

55. jim_thompson5910

is there a typo in the table? I see 0.005 written twice along the top

56. jim_thompson5910

I'm guessing that first 0.005 should be 0.05 ?

57. anonymous

yes, there is

58. jim_thompson5910

ok thought so

59. jim_thompson5910

Degrees of Freedom df = k-1 = 3-1 = 2 look at the row that starts with 2 and look at the column that has 0.05 at the top

60. jim_thompson5910

So we know test statistic = 6.89 critical value = 5.99

61. jim_thompson5910

do you see how to finish up?

62. LynFran

actually we did all of this is just how to compare and tell the correct answer part that a bit troublesome

63. jim_thompson5910

Rule: if (test statistic) > (chi-square critical value), then reject the null

64. jim_thompson5910

the goodness of fit test is most always right tailed. I've never seen any cases that are otherwise, but I don't know for sure since there may be some rare cases

65. anonymous

@jim_thompson5910 okay, reject the null, but we can't determine whether it would be option A or D. (Yes, or No)

66. anonymous

from the options at the bottom of this attachment

67. jim_thompson5910

Null: the observed matches with the expected Alternate: the observed does not match with the expected we rejected the null, so the observed does not match with the expected The question was "did the model predict the sales correctly?" ie "does the expected and observed values match up?" so the the answer is "no". The reason why the null was rejected was because the chi-square test statistic was too high

68. anonymous

Ohhhh! so it's actually B I was looking at it backwards

69. jim_thompson5910

yeah it's B

70. LynFran

wasnt the chic squared values 5.99? so how come that higher than 6.89??

71. anonymous

Thank you both! I'll write your testimonials when I'm all done. (later tonight/early morning)

72. jim_thompson5910

that 5.99 is the critical value

73. jim_thompson5910

it's the cutoff point

74. anonymous

I greatly appreciate all the help :)

75. jim_thompson5910

anything higher than that cutoff point means you reject H0

76. LynFran

o ok i see

77. jim_thompson5910

|dw:1435292080595:dw|

78. jim_thompson5910

|dw:1435292122002:dw|

79. LynFran

yes ur right