Exam2 A learning experience….
Scores Raw Scores went from 68 to 147 As percentage of total….40% to 86% Scaled scores went from 60.5 to 100 Some still left to be graded… 90s8 80s23 70s23 60s5 TOTAL59
Question by Question Question rawscaled count59 min max avg s avail
Data for Q1 to Q3 Car ClassDisplacementFuel TypeHwy MPG 1 Midsize3.5R28 2 Midsize3R26 3 Large3P26 4 Large3.5P Compact6P20 59 Midsize2.5R30 60 Midsize2R32 Categorical Numerical n=60
Q1 expect that the size of the car engine (measured by displacement) would change based on car class (compact, midsize, large) H0: MU(compact)=MU(mid)=MU(large) Ha: not all equal ANOVA single factor (3 samples) Unstack the data, excel data analysis
Q2 expect to see a relationship between car class and recommended fuel type Relationship between two categorical variables (car class and fuel type) Chi-sq independence test – 3x2 contingency table of counts…summing to 60 PR Compact16319 Large11516 Midsize
Q3. Fuel type and mpg expect that because premium gasoline is higher quality, cars for which it is recommended will get higher gas mileage (on average) than cars for which regular fuel is recommended Ho: MU(prem) = MU(reg) Ha: MU(prem) > MU(reg) Unstack, T-test two sample NOTE: We guessed the wrong tail. Do not reject HO in favor of THIS Ha. t-Test: Two-Sample Assuming Equal Variances PR Mean Variance Observations3624 Pooled Variance Hypothesized Mean Difference0 df58 t Stat P(T<=t) one-tail t Critical one-tail P(T<=t) two-tail t Critical two-tail R got higher sample mean The wrong p value The correct p value
Q4a Aspirin and Heart Attack Relationship between two 0/1 variable. 2x2 contingency table from the facts in the question (like lights and myopia). Chi-sq independence test for 2T alternative. Half the pvalue if you want a 1T alternative (Paspirin < Pplacebo) Heart AttackNo Heart Attack Aspirin Placebo
Q4b. How many heart attacks using new design (given Ps) It is easy to calculate the mean (most likely) of Tell me that the actual number is a random variable Provide a probability distribution for that random variable Number of Heart Attacks GroupNumberProbabilitymeanvariancestd dev aspirin placebo TOTAL Normal approx to binomial
Q4c. Will new design affect p-value? Yes. We will be more certain about Aspirin’s effect and LESS certain about Placebo’s effect. The test is focused on the difference. The gain in accuracy for aspirin is not as great as the loss in accuracy for placebo (diminishing returns) Our test will be less powerful. P-value will go up. 50/50 v 75/25 v 100/0 Best designWorst design
Q5. Is Di significantly better than El? Not about whether P=0.5 About whether P(di)=P(el) 2x2 chi-squared independence test InOut Di10 20 El Expected Distances calculated chi- suared Pvalue Pvlaue/ tailed p- value 1 tailed p- value
Q6. Rportfolio Rportfolio = (R1+R2+R3)/3 StockMean ReturnVarianceStandard Deviation TOTAL Rportfolio Sum of variances (independent).414/3 R1, R2, R3 Will not be Independent.
Q7. Total (Avg) weight of n=20 Mean = 20*μ Variance = 20*σ 2 Normal (sum of normals) MeanVarianceStd Dev One guest Total of 20 guests Pr(total<3500) = NORMDIST(3500,3000,178.9,true) = Family hotel means….. Weights in elevator not independent. More likely to be under 3500.
Q8. Al and Bo
Q9 If students don’t cheat, then their IQs are independent identically distributed N(100,15) The null hypothesis (mean men = mean women) IS TRUE!!! When H0 is true, and we do any test correctly, we reject with probability We will reject H0 with probability 0.05 and fail to reject with probability 0.95 What will happen under H0 is “easy” What will happen under Ha is very difficult…