inst/shiny-apps/passa/t_test_help.md

Two-sample Example: We want to know if there is a difference in the mean price of what male and female students pay at a library coffee shop. Let's say we want to detect a difference as large as 75 cents, and we assume the standard deviation of purchase prices for each gender is $2.25. Set True Difference in Means to 0.75 and Standard Deviation to 2.25.

One-sample Example: We think the average purchase price at a library coffee shop is over $3 per student. Our null hypothesis is $3 or less; our alternative hypothesis is greater than $3. If the true average purchase price is $3.50, we would like to have 90% power to detect that the estimated average purchase price is greater than $3. How many transactions do we need to observe assuming a significance level of 0.05 and a purchase price standard deviation of $2.25? Set True Difference in Means to 0.5, set Standard Deviation to 2.25, set Power to 0.9, select Type 'One-Sample,' and select Alternative 'Greater.'

Paired T-test Example: We want to know if an ultra-heavy rope-jumping program decreases 40-yard dash time. We'll recruit students and measure their 40 time before the program and after. Assume the standard deviation of the differences (after time - before time, for each student) will be about 0.25 seconds. How many students do we need to recruit to detect an average improvement of 0.08 seconds with 80% power and 0.05 significance? Set True Difference in Means to -0.08, Standard Deviation to 0.25, and Type as 'paired.'



clayford/consultr documentation built on Aug. 5, 2021, 7:29 p.m.