Presentation is loading. Please wait.

Presentation is loading. Please wait.

Example 1 We wanted to know if the American League or National League had better pitching – many people believe the NL has stronger pitching (which means.

Similar presentations


Presentation on theme: "Example 1 We wanted to know if the American League or National League had better pitching – many people believe the NL has stronger pitching (which means."— Presentation transcript:

1 Example 1 We wanted to know if the American League or National League had better pitching – many people believe the NL has stronger pitching (which means lower scores). Are they correct at the p <.01 criterion? Data is part of the R file, run the first two lines of code to get it set up.

2 Step 1 Assumptions: – DV scale? Yes – ratio – Randomly select – yes, random assign – no – Normal? Unlikely don’t know, N < 30 – Homogeneity – SD they are roughly equal

3 Step 2 R: AL > NL N: AL <= NL

4 Step 3 Group 1 ALGroup 2 NL Mean3.672.67 SD1.490.96 N67 df56 Spooled1.23 Sdifference0.69

5 Formulas spooled = sqrt( ((n1-1)*sd1^2 + (n2-1)*sd2^2) / (n1+n2 - 2)) sdifference = sqrt((spooled^2/n1 + spooled^2/n2))

6 Step 4 qt(.01, 11, lower.tail = F) P <.01 Df total = 5 + 6 Lower.tail = F because greater than test Critical t is 2.72

7 Step 5 Two Sample t-testdata: data$al and data$nl t = 1.4524, df = 11, p-value = 0.08716 alternative hypothesis: true difference in means is greater than 099 percent confidence interval: -0.8673207 Inf sample estimates: mean of x mean of y 3.666667 2.671429

8 Step 6 NOPE Fail to reject

9 Confidence Interval Confidence interval of mean difference – Most CI are two tailed – Using t.test() – 99 percent confidence interval: -1.133010 3.123486

10 Effect Size d =.81

11 Example 2 A while back, MSU considering changing their mascot to be more ferocious. Students rated their preference of mascot on a 1 to 5 scale. Did they prefer the new mascot? Use the p <.05 criterion. Data is built into the R code.

12 Step 1 Assumptions: – DV scale – yes, interval – Normal - I don’t know N < 30 – Random selection – nope, random assign - yes – Homogeneity – yes

13 Step 2 R: old < new N: old > = new

14 Step 3 Group 1 oldGroup 2 new Mean2.783.67 SD.971 N99 df88 Spooled.99 Sdifference,46

15 Step 4 Less than test P <.05 Df total = 8 + 8 = 16 qt(.05, 16, lower.tail = T) T critical = -1.75

16 Step 5 Two Sample t-testdata: dataexp2$old and dataexp2$new t = -1.9124, df = 16, p-value = 0.03695 alternative hypothesis: true difference in means is less than 0 95 percent confidence interval: -Inf - 0.07738273 sample estimates: mean of x mean of y 2.777778 3.666667

17 Step 6 Reject the null!

18 Confidence Interval Confidence interval of the mean difference 95 percent confidence interval: -1.87424446 0.09646668

19 Effect Size M1 = 2.78, SD = 0.97, SE = 0.32, 95%CI[2.03 - 3.53] M2 = 3.67, SD = 1.00, SE = 0.33, 95%CI[2.90 - 4.44] t(16) = -1.91, p = 0.07, d = -0.90, 95%CI[-1.86 - 0.09]


Download ppt "Example 1 We wanted to know if the American League or National League had better pitching – many people believe the NL has stronger pitching (which means."

Similar presentations


Ads by Google