Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Welcome to . Week 11 Thurs . MAT135 Statistics In-Class Project What is your favorite diamond simulant? (1 most-5 least) What is your favorite white gem? Hypothesis Tests How all the inferential tests work: Hypothesis Tests How all the inferential tests work: Excel/your calculator calculates a probability that you would get the data you got if the null hypothesis were true Hypothesis Tests How all the inferential tests work: Excel/your calculator calculates a probability that you would get the data you got if the null hypothesis were true If it’s ≤ α-level, reject H0 HYPOTHESIS TESTS PROJECT QUESTION The probability is .03 Do you reject H0? HYPOTHESIS TESTS PROJECT QUESTION The probability is .03 Do you reject H0? Yup! As long as your α wasn’t .01 Hypothesis Tests CELEBRATE! Hypothesis Tests Remember – Reject the hypothesis if the statistic is smaller than 0.05 HYPOTHESIS TESTS PROJECT QUESTION Reject H0 ! Conclusion? HYPOTHESIS TESTS PROJECT QUESTION Reject H0 ! Conclusion: The batches do taste different! HYPOTHESIS TESTS PROJECT QUESTION Which tastes better? HYPOTHESIS TESTS PROJECT QUESTION For tests of differences between means, what would happen if you had a bigger sample size? Hypothesis Tests The p value comes from a standardized t-distribution: Questions? Difference Between Means We use the t-test when we have paired data because it is more powerful We could use it for other twogroup comparisons, but we usually use another analysis: Difference Between Means Comparing Several Group's Means: “ANOVA” “Analysis of Variance” Difference Between Means t-tests can only be used for comparing two groups ANOVA can be used to compare two or more groups Difference Between Means A paired t-test is more powerful A non-paired t-test is THE SAME as an ANOVA (ANOVA’s Excel output page is better) Difference Between Means “ANOVA” stands for “ANalysis Of VAriance” Difference Between Means The analysis assigns the variability in the data to: the difference between the groups the difference between individuals Difference Between Means Sir Ronald Aylmer Fisher Difference Between Means Salaries for Criminal Justice Jobs Difference Between Means There are four classifications of jobs: probation, administration, correctional and patrol We want to compare the average salaries to see if they are the same ANOVA PROJECT QUESTION What would be a good value for α? ANOVA PROJECT QUESTION α = .05 What would be a good level of practical significance? ANOVA PROJECT QUESTION What is Ha? ANOVA PROJECT QUESTION Alternative hypothesis Ha: There are differences in the salaries of the four job classifications: μprobation ≠ μadministration ≠ μcorrectional ≠ μpatrol What is H0? ANOVA PROJECT QUESTION Null (no difference) hypothesis H0: There is no difference in salaries for the four job classifications: μprobation = μadministration = μcorrectional = μpatrol Difference Between Means Our strategy: We hope to disprove H0 and thereby to prove Ha ANOVA PROJECT QUESTION Why can’t you use a t-test for this data? Probation $26,834 $50,748 $39,766 $23,079 $45,883 $51,482 Admin Correctional Patrol $54,780 $41,216 $64,632 $63,447 $23,101 $26,782 $63,687 $27,957 $28,697 $55,653 $53,316 $30,732 $59,299 $32,747 $52,670 $63,063 $21,339 $36,893 ANOVA PROJECT QUESTION Clear your TI83/4 data fields Probation $26,834 $50,748 $39,766 $23,079 $45,883 $51,482 Admin Correctional Patrol $54,780 $41,216 $64,632 $63,447 $23,101 $26,782 $63,687 $27,957 $28,697 $55,653 $53,316 $30,732 $59,299 $32,747 $52,670 $63,063 $21,339 $36,893 ANOVA PROJECT QUESTION Put “Probation” data in L1, “Admin” data in L2, “Correctional” in L3 and “Patrol” in L4 Probation $26,834 $50,748 $39,766 $23,079 $45,883 $51,482 Admin Correctional Patrol $54,780 $41,216 $64,632 $63,447 $23,101 $26,782 $63,687 $27,957 $28,697 $55,653 $53,316 $30,732 $59,299 $32,747 $52,670 $63,063 $21,339 $36,893 ANOVA PROJECT QUESTION “STAT” “TESTS” “ANOVA” (at the bottom on my TI83) ENTER ANOVA(L1,L2,L3,L4) ENTER Probation $26,834 $50,748 $39,766 $23,079 $45,883 $51,482 Admin Correctional Patrol $54,780 $41,216 $64,632 $63,447 $23,101 $26,782 $63,687 $27,957 $28,697 $55,653 $53,316 $30,732 $59,299 $32,747 $52,670 $63,063 $21,339 $36,893 Poof! Done! I got: ANOVA PROJECT QUESTION One-way ANOVA F=5.908580719 p=.0046661234 Factor df=3 SS=2416783902 MS=805594634 Error df=20 SS=2726863429 MS=136343171 Sxp=11676.6079 What are we looking for? ANOVA PROJECT QUESTION One-way ANOVA F=5.908580719 p=.0046661234 Factor df=3 SS=2416783902 MS=805594634 Error df=20 SS=2726863429 MS=136343171 Sxp=11676.6079 ANOVA PROJECT QUESTION What is our decision? One-way ANOVA F=5.908580719 p=.0046661234 Factor df=3 SS=2416783902 MS=805594634 Error df=20 SS=2726863429 MS=136343171 Sxp=11676.6079 Reject H0! ANOVA PROJECT QUESTION One-way ANOVA F=5.908580719 p=.0046661234 Factor df=3 SS=2416783902 MS=805594634 Error df=20 SS=2726863429 MS=136343171 Sxp=11676.6079 ANOVA PROJECT QUESTION What is our conclusion? ANOVA PROJECT QUESTION What is your conclusion? We conclude there is a significant difference between the average pay of the CJ job categories Difference Between Means Remember – Reject the null hypothesis if the statistic is smaller than 0.05 Questions? Difference Between Means For the CJ job classifications, we rejected H0 and concluded the salaries are different Difference Between Means But… Are they all different, or is just one different or two or … Difference Between Means Do a HI-Lo-Close Confidence Interval graph! Difference Between Means From Excel: Probation Upper 95% CI 49,571 Lower 95% CI 29,693 Mean 39,632 Admin 63,284 56,692 59,988 Correctional Patrol 43,207 52,532 23,351 27,603 33,279 40,068 ANOVA PROJECT QUESTION Which means are different? ANOVA PROJECT QUESTION Is the difference practically significant? Difference Between Means BTW: pre-Excel, this comparison used to be REALLY hard to do! Difference Between Means Yay Excel! Difference Between Means PROJECT QUESTION What would happen if you had a bigger sample size? Difference Between Means PROJECT QUESTION What would happen if you had a bigger sample size? You would be able to show more statistically significant differences Difference Between Means PROJECT QUESTION Difference Between Means t-tests and ANOVAs are designed to be VERY powerful for small sample sizes Difference Between Means That’s why we include a level of practical significance Difference Between Means Similar to previous tests, the P comes from a standardized F-distribution: Difference Between Means Because “z” and “t” are based on 𝒙 , they have similar shapes F is based on a variance, so it is in squared units! Questions? ANOVA The ANOVA we just did is called a “One Factor ANOVA” ANOVA The ANOVA we just did is called a “One Factor ANOVA” Because there is only one category (type of job) – called a “factor” ANOVA You can have as many factors as you want ANOVA Excel can handle 2 factors 2 Factor ANOVA This one is tricky – you have to have the same number of observations in each category M F $ $ $ $ Educ Level HS Assoc Bachelor's 15,000 $ 25,000 $ 35,000 14,000 $ 24,000 $ 34,000 12,000 $ 35,000 $ 32,000 15,000 $ 43,000 $ 35,000 2 Factor ANOVA With only one observation it’s called “without replication” M F $ $ $ $ Educ Level HS Assoc Bachelor's 15,000 $ 25,000 $ 35,000 14,000 $ 24,000 $ 34,000 12,000 $ 35,000 $ 32,000 15,000 $ 43,000 $ 35,000 2 Factor ANOVA With only one observation it’s called “without replication” With more than one, it’s called “with replication” M F $ $ $ $ Educ Level HS Assoc Bachelor's 15,000 $ 25,000 $ 35,000 14,000 $ 24,000 $ 34,000 12,000 $ 35,000 $ 32,000 15,000 $ 43,000 $ 35,000 2 Factor ANOVA An ANOVA table: ANOVA Source of Variation Total Gender Educ Level Interaction Within SS df MS F 1,214,916,667 11 52,083,333 1 52,083,333 7.35 960,166,667 2 480,083,333 67.78 160,166,667 2 80,083,333 11.31 42,500,000 6 7,083,333 p 4% 0% 1% You survived! Turn in your homework! Don’t forget your homework due next week! Have a great rest of the week! www.playbuzz.com