260 likes | 267 Views
This .Stat lab session will cover the 5 steps for hypothesis testing, review confidence intervals, and discuss the procedures for one-sample tests, including the assumptions and test statistic calculations. The session will also introduce paired t-tests and compare them to independent difference problems.
E N D
Stat 350 Lab SessionGSI: Yizao WangSection 016 Mon 2pm30-4pm MH 444-DSection 043 Wed 2pm30-4pm MH 444-B
Today’s Agenda • 5 Steps for Hypothesis Testing Review • Module 6 Activity 1One Sampe Test Procedures • Module 7 Activity 1Paired t Procedures • In-Lab Review: confidence intervals • Today’s Qwizdom is no longer anonymous. Please use your UMID to log in.
5 Steps for Hypothesis Testing 1. Set up the null and alternative hypotheses • Hypothesis is about the population parameters (p, μ) • H0 represents statement of no effect • Ha represents what the experimenter would like to support • Equal signalways goes to the H0 • The direction in Ha is very important in calculating p-value • The significant level is also set at this step (most of the time by the problem)
5 Steps for Hypothesis Testing 2. Check assumptions for performing the test and calculate the test statistic For 1-sample testing of population proportion, check • (1) random sample • (2) If np0>=10 and n(1-p0)>=10Help the computation of p-value. What to do when (2) does not hold? (very rare case) For 1-sample testing of population mean, check • (1) random sample • (2) Normality of populationNot crucial when n>=30, because of CLT
5 Steps for Hypothesis Testing 2. Check assumptions for performing the test and calculate the test statistic • How to check random sample?Information from the problem Time plot if data is collected in time • How to check normality?QQ plot • Which statistic to use?Under normality assumptionuse z-statistic when σ is known (population proportion)use t-statistic when σ is unknown (population mean for most of the time)
5 Steps for Hypothesis Testing 3. Assuming H0 is true, find the p-value • p-value is, assuming H0 is true, the probability of getting the same or more extremetest statistic in the direction of Ha. It’s a conditional probability. • p-value = P (t.s. typedirectiont.s. value) e.g. p-value = P (t <= -2)Test statistic type is decided according to the problemTest statistic value is then calculatedDirection is equal and the direction in Ha
5 Steps for Hypothesis Testing 4. Determine if the result is statistically significant • p-value <= significance level: Reject H0 (the test is statistically significant) • p-value > significance level: Fail to reject H0 5. Report a conclusion in the context of the problem • There is sufficient evidence to say… Ha • There is no sufficient evidence to say… Ha.
5 Steps for Hypothesis Testing • Set up the null and alternative hypotheses • Check assumptions for performing the test and calculate the test statistic • Assuming H0 is true, find the p-value • Determine if the result is statistically significant • Report a conclusion in the context of the problem
Module 6 Activity 1 One sample t test procedures • Ctools salmonella.sav • We will start step by step with Qwizdom questions…
Order the steps for conducting a hypothesis test... • Assumptions and test statistic • State the hypotheses • Find the p-value • Conclusion • Decision
What is the response? • Individual salmonella levels • Average salmonella level
What type of variable is the response? • Discrete • Continuous
What type of parameter would be useful for summarizing this variable? • Proportion • Mean
What is the specific parameter of interest? p μ μd μ1 – μ2 p1 – p2
Select the appropriate alternative hypothesis Ha: μ > 0.3 Ha: μ ≥ 0.3 Ha: μ < 0.3 Ha: μ ≤ 0.3 Ha: μ ≠ 0.3
What graph could be used to check the random sample assumption? Histogram Boxplot Time-series plot QQ-plot
What graph would be used to check the normal distribution assumption? Histogram Boxplot Time-series plot QQ-plot
What is the distribution of the test statistics if Ho is true? N(0,1) N(μ,σ) t(n) t(n-1)
Yes or No Are the results statistically significant at the 5% level?
Interpretations • Test statistic: the observed sample mean was 2.205 average distances (i.e. 2.205 standard errors) above the hypothesizedmean of 0.3. • P-value: the p-value of (0.059/2) = 0.0295 indicates that if the mean level is really 0.3 MPH/g, and if repeated random samples of the same size were drawn from the population of Salmonella enteritidis levels, the probability of observing a test statistic value as large as 2.205 or larger is only 0.0295.
Paired t Procedures • Similar to one sample t procedures(Module 6 Activity 1) • μD taking place of μ • Paired difference vs. Difference of parameter of two populations (μD vs.μ1 - μ2 )
Paired vs. Independent Difference Problem: are the books from Amazon.com cheaper than those from Borders? • Scenario 1: pick 100 books randomly, record the price differences of two sellers and analyze. • Scenario 2: pick 100 books randomly from Amazon.com and 100 books randomly from Borders, calculate the mean price of each group and calculate the difference and analyze. Which scenario is better for this problem?
Module 7 Activity 1 • Ctools books.sav
Interpretation of p-Value • If the null hypothesis is true and this procedure (experiment) was repeated many times, we would expect to see a T-test statistic value of -1.104 or larger in 86.15% of the repetitions. • Thus our data are not at all unusualunder the null hypothesis theory.
In-Lab Review • 15-20 minutes Ctools\Lab info\in lab review on CI
Before We Finish … • Questions and comments?