t tests and analysis of variance l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
T-Tests and Analysis of Variance PowerPoint Presentation
Download Presentation
T-Tests and Analysis of Variance

Loading in 2 Seconds...

play fullscreen
1 / 58

T-Tests and Analysis of Variance - PowerPoint PPT Presentation


  • 121 Views
  • Uploaded on

T-Tests and Analysis of Variance. Jennifer Kensler. Laboratory for Interdisciplinary Statistical Analysis Virginia Tech’s source for expert statistical analysis since 1948. www.lisa.stat.vt.edu. Collaboration: Personalized statistical advice Great advice right now:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'T-Tests and Analysis of Variance' - marisol


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide2

Laboratory for Interdisciplinary Statistical Analysis

Virginia Tech’s source for expert statistical analysis since 1948

www.lisa.stat.vt.edu

Collaboration:

Personalized statistical advice

Great advice right now:

Meet with LISA before

collecting your data

Short Courses:

Designed to help

graduate students apply statistics in their research

Walk-In Consulting:

Monday—Friday* 12-2PM

for questions <30 minutes

* Mon—Thurs in summer

* We help with research—not

class projects or homework

slide3

Laboratory for Interdisciplinary Statistical Analysis

Virginia Tech’s source for expert statistical analysis since 1948

www.lisa.stat.vt.edu

Collaboration:

Personalized statistical advice

Great advice right now:

Meet with LISA before

collecting your data

Short Courses:

Designed to help

graduate students apply statistics in their research

Walk-In Consulting:

Monday—Friday* 12-2PM

for questions <30 minutes

* Mon—Thurs in summer

* We help with research—not

class projects or homework

one sample t test6
One Sample T-Test
  • Used to test whether the population mean is different from a specified value.
  • Example: Is the mean height of 12 year old girls greater than 60 inches?
step 1 formulate the hypotheses
Step 1: Formulate the Hypotheses
  • The population mean is not equal to a specified value.

H0: μ = μ0

Ha: μ ≠ μ0

  • The population mean is greater than a specified value.

H0: μ = μ0

Ha: μ > μ0

  • The population mean is less than a specified value.

H0: μ = μ0

Ha: μ < μ0

step 2 check the assumptions
Step 2: Check the Assumptions
  • The sample is random.
  • The population from which the sample is drawn is either normal or the sample size is large.
steps 3 5
Steps 3-5
  • Step 3: Calculate the test statistic:

Where

  • Step 4: Calculate the p-value based on the appropriate alternative hypothesis.
  • Step 5: Write a conclusion.
iris example
Iris Example
  • A researcher would like to know whether the mean sepal width of a variety of irises is different from 3.5 cm.
  • The researcher randomly measures the sepal width of 50 irises.
  • Step 1: Hypotheses

H0: μ = 3.5 cm

Ha: μ ≠ 3.5 cm

slide11
JMP
  • Steps 2-4:

JMP Demonstration

Analyze  Distribution

Y, Columns: Sepal Width

Test Mean

Specify Hypothesized Mean: 3.5

jmp output
JMP Output
  • Step 5 Conclusion: The mean sepal width is not significantly different from 3.5 cm.
two sample t test14
Two Sample T-Test
  • Two sample t-tests are used to determine whether the population mean of one group is equal to, larger than or smaller than the population mean of another group.
  • Example: Is the mean cholesterol of people taking drug A lower than the mean cholesterol of people taking drug B?
step 1 formulate the hypotheses15
Step 1: Formulate the Hypotheses
  • The population means of the two groups are not equal.

H0: μ1 = μ2

Ha: μ1 ≠ μ2

  • The population mean of group 1 is greater than the population mean of group 2.

H0: μ1 = μ2

Ha: μ1 > μ2

  • The population mean of group 1 is less than the population mean of group 2.

H0: μ1 = μ2

Ha: μ1 < μ2

step 2 check the assumptions16
Step 2: Check the Assumptions
  • The two samples are random and independent.
  • The populations from which the samples are drawn are either normal or the sample sizes are large.
  • The populations have the same standard deviation.
steps 3 517
Steps 3-5
  • Step 3: Calculate the test statistic

where

  • Step 4: Calculate the appropriate p-value.
  • Step 5: Write a Conclusion.
two sample example
Two Sample Example
  • A researcher would like to know whether the mean sepal width of setosa irises is different from the mean sepal width of versicolor irises.
  • Step 1 Hypotheses:

H0: μsetosa = μversicolor

Ha: μsetosa ≠ μversicolor

slide19
JMP
  • Steps 2-4:

JMP Demonstration:

Analyze  Fit Y By X

Y, Response: Sepal Width

X, Factor: Species

jmp output20
JMP Output
  • Step 5 Conclusion: There is strong evidence (p-value < 0.0001) that the mean sepal widths for the two varieties are different.
paired t test22
Paired T-Test
  • The paired t-test is used to compare the means of two dependent samples.
  • Example:

A researcher would like to determine if background noise causes people to take longer to complete math problems. The researcher gives 20 subjects two math tests one with complete silence and one with background noise and records the time each subject takes to complete each test.

step 1 formulate the hypotheses23
Step 1: Formulate the Hypotheses
  • The population mean difference is not equal to zero.

H0: μdifference = 0

Ha: μdifference ≠ 0

  • The population mean difference is greater than zero.

H0: μdifference = 0

Ha: μdifference > 0

  • The population mean difference is less than a zero.

H0: μdifference = 0

Ha: μdifference < 0

step 2 check the assumptions24
Step 2: Check the assumptions
  • The sample is random.
  • The data is matched pairs.
  • The differences have a normal distribution or the sample size is large.
steps 3 525
Steps 3-5
  • Step 3: Calculate the test Statistic:
  • Where d bar is the mean of the differences and sdis the standard deviations of the differences.
  • Step 4: Calculate the p-value.
  • Step 5: Write a conclusion.
paired t test example
Paired T-Test Example
  • A researcher would like to determine whether a fitness program increases flexibility. The researcher measures the flexibility (in inches) of 12 randomly selected participants before and after the fitness program.
  • Step 1: Formulate a Hypothesis

H0: μAfter-Before = 0

Ha: μ After-Before > 0

paired t test example27
Paired T-Test Example
  • Steps 2-4:

JMP Analysis:

Create a new column of After – Before

Analyze  Distribution

Y, Columns: After – Before

Test Mean

Specify Hypothesized Mean: 0

jmp output28
JMP Output

Step 5 Conclusion: There is not evidence that the fitness program increases flexibility.

one way anova
One-Way ANOVA
  • ANOVA is used to determine whether three or more populations have different distributions.

A B C

Medical Treatment

anova strategy
ANOVA Strategy
  • The first step is to use the ANOVAF test to determine if there are any significant differences among means.
  • If the ANOVA F test shows that the means are not all the same, then follow up tests can be performed to see which pairs of means differ.
one way anova model
One-Way ANOVA Model

In other words, for each group the observed value is the group mean plus some random variation.

one way anova hypothesis
One-Way ANOVA Hypothesis
  • Step 1: We test whether there is a difference in the means.
step 2 check anova assumptions
Step 2: Check ANOVA Assumptions
  • The samples are random and independent of each other.
  • The populations are normally distributed.
  • The populations all have the same variance.
  • The ANOVA F test is robust to the assumptions of normality and equal variances.
step 3 anova f test
Step 3: ANOVA F Test

A B C A B C

Medical Treatment

Compare the variation within the samples to the variation between the samples.

anova test statistic
ANOVA Test Statistic

Variation within groups small compared with variation between groups

→ Large F

Variation within groups large compared with variation between groups → Small F

slide37
MSG
  • The mean square for groups, MSG, measures the variability of the sample averages.
  • SSG stands for sums of squares groups.
slide38
MSE
  • Mean square error, MSE, measures the variability within the groups.
  • SSE stands for sums of squares error.
steps 4 5
Steps 4-5
  • Step 4: Calculate the p-value.
  • Step 5: Write a conclusion.
anova example
ANOVA Example
  • A researcher would like to determine if three drugs provide the same relief from pain.
  • 60 patients are randomly assigned to a treatment (20 people in each treatment).
  • Step 1: Formulate the Hypotheses

H0: μDrugA = μDrug B = μDrug C

Ha : The μi are not all equal.

steps 2 4
Steps 2-4
  • JMP demonstration

Analyze  Fit Y By X

Y, Response: Pain

X, Factor: Drug

jmp output and conclusion
JMP Output and Conclusion
  • Step 5 Conclusion: There is strong evidence that the drugs are not all the same.
follow up test
Follow-Up Test
  • The p-value of the overall F test indicates that the level of pain is not the same for patients taking drugs A, B and C.
  • We would like to know which pairs of treatments are different.
  • One method is to use Tukey’s HSD (honestly significant differences).
tukey tests
Tukey Tests
  • Tukey’s test simultaneously tests
  • JMP demonstration

Oneway Analysis of Pain By Drug 

Compare Means  All Pairs, Tukey HSD

for all pairs of factor levels. Tukey’s HSD controls the overall type I error.

jmp output45
JMP Output
  • The JMP output shows that drugs A and C are significantly different.
two way anova
Two-Way ANOVA
  • We are interested in the effect of two categorical factors on the response.
  • We are interested in whether either of the two factors have an effect on the response and whether there is an interaction effect.
    • An interaction effect means that the effect on the response of one factor depends on the level of the other factor.
two way anova example
Two-Way ANOVA Example
  • We would like to determine the effect of two alloys (low, high) and three cooling temperatures (low, medium, high) on the strength of a wire.
  • JMP demonstration

Analyze  Fit Model

Y: Strength

Highlight Alloy and Temp and click Macros  Factorial to Degree

jmp output51
JMP Output

Conclusion: There is strong evidence of an interaction between alloy and temperature.

analysis of covariance ancova
Analysis Of Covariance (ANCOVA)
  • Covariates are variables that may affect the response but cannot be controlled.
  • Covariates are not of primary interest to the researcher.
  • We will look at an example with two covariates, the model is
ancova example
ANCOVA Example
  • Consider the one-way ANOVA example where we tested whether the patients receiving different drugs reported different levels of pain. Perhaps age and gender may influence the pain. We can use age and gender as covariates.
  • JMP demonstration

Analyze  Fit Model

Y: Pain

Add: Drug

Age

Gender

conclusion
Conclusion
  • The one sample t-test allows us to test whether the population mean of a group is equal to a specified value.
  • The two-sample t-test and paired t-test allow us to determine if the population means of two groups are different.
  • ANOVA and ANCOVA methods allow us to determine whether the population means of several groups are statistically different.
sas and spss
SAS and SPSS
  • For information about using SAS and SPSS to do ANOVA:

http://www.ats.ucla.edu/stat/sas/topics/anova.htm

http://www.ats.ucla.edu/stat/spss/topics/anova.htm

references
References
  • Fisher’s Irises Data (used in one sample and two sample t-test examples).
  • Flexibility data (paired t-test example):

Michael Sullivan III. Statistics Informed Decisions Using Data. Upper Saddle River, New Jersey: Pearson Education, 2004: 602.