Hypothesis tes+ng involving one or two samples: t test!!!!
March 6, 2016 | Author: Lucinda Meredith Welch | Category: N/A
Short Description
1 p value quantifies random error Hypothesis tes+ng involving one or two samples: t test!!!! Laurens Holmes, Jr. Board C...
Description
p value quantifies random error
Hypothesis tes+ng involving one or two samples: t test!!!! Laurens Holmes, Jr. Board Cer+fied Public Health, FACE
One sample/two samples • One sample • Hypothesis tes+ng is developed and applied to one-‐ sample problems of sta+s+cal inference • Specified about a single sample
• Two Sample • Two sample problem • Compares two different distribu+ons
Terms: Standard Error/Standard Devia+on • • • • • • • • •
SE or SEM refers to the quan+ta+ve measure of the variability of sample means obtained from repeated random samples of size n drawn from the same popula+on. Rela+onships: SE is directly propor+onal to inverse of the (a) square root of the sample size n (1/ √n), (b) popula+on SD σ of individual observa+ons. The larger n (sample size), the more precise the es+mate of μ. Sample precision is affected by variance the square root of the variance. Implica+ons: Sample size is essen+al in assessing the precision of our es+mate X of the unknown popula+on mean μ. SE = SD / √n Vigne\e: Suppose a mother wishes to determine exact temp of her son or daughter for the purpose a fever-‐induced seizure. If there is a theory that seizure occurs temp eleva+on by an amount 0.5 to 1.0 degrees Fahrenheit. Using these temps (10 days), es+mate mean. How precise is this es+mate?
Vigne\e : Body temperature and childhood seizures Day
1
Temp 97.2
2
3
4
5
6
7
8
9
10
96.8
97.4
97.4
97.3
97.0
97.1
97.3
97.3
97.2
What is the mean?
What is the SEM?
Can θΔ be used to seizure day?
Hypothesis Tes+ng • Ra+onale? Hypothesis tes+ng provides an objec+ve framework for making decision using probabilis+c methods rather than relying on subjec+ve impression. • Provides a uniform decision-‐making criterion that is consistent for other clinician and methodologists.
• • • • •
What are parameters? What ideas do we have? Do our data conform to the ideas? Vigne\e: Suppose it is known that the average cholesterol level in healthy US children is175mg/dl. There were a group of men who died from coronary heart disease (CAD) within the past year. Suppose too that we have the cholesterol level of their offspring. • What hypothesis may be tested in this situa+on?
Terms: Types I and II Errors • Hypothesis tes+ng a\empt to draw conclusion about the real world situa+on based on the results of the sta+s+cal test • There are 4 possible outcomes in hypothesis tes+ng – – – –
Ho is true and Ho is accepted (Correct decision) H1 is true and Ho is accepted (Type I error) Ho is true and Ho is rejected (Correct decision) H1 is true and Ho is rejected (Type II error)
• Type I error (α): Probability of rejec+ng the null hypothesis when indeed the null is true • Type II error (β): Probability of accep+ng the null hypothesis when indeed the alterna+ve is true. • Significance level (pre-‐established, conven+onally at 5%) is used to determine the probability of making a type I error. • With α < 0.05 we reject the null hypothesis of no difference and incline towards the alternate hypothesis of difference – “sta+s+cally significant”, and implies that the difference is not due to random error.
Hypothesis Tes+ng • What is the rela+ve probabili+es of obtaining sample data under testable hypotheses?
– Hypotheses are mutually exclusive (both cannot be correct) and all inclusive (one must be true)
• Statement: • Ho – The average cholesterol of these children is 175mg/dl – States that any observed difference is caused by random error
• H1 – The average cholesterol level of these children is > 175mg/dl
– States that the observed difference is caused by a systema+c difference between groups
Vigne\e • Suppose we obtain birth weights from 100 consecu+ve, full-‐term, live-‐born deliveries from the maternity ward of no-‐name hospital in a low-‐SES area. The average birth weight, based on na+onwide survey of millions of deliveries is 120oz, and the mean of the birth weight of the 100 deliveries is 115 oz, with a sample SD of 24 oz. • Is the underlying mean birth weight from the no-‐name hospital lower than the US na+onal average? • Hints – Assump+on: The 100 birth weights from this hospital come from an underlying normal distribu+on with unknown mean μ.
Vigne\e: Inference when the popula+on weight is known
• Suppose the average weight of children 0-‐18 years in the Delaware (DE) is 40kg. • Are the 66 cerebral palsy children who underwent spinal fusion for curve deformi+es correc+on different in weight from the healthy children in DE? • Explain your answer, and provide the data.
Normality Test
Normality Test: skewness / kurtosis
SPSS Output • What is the rela+ve probabili+es of obtaining the sample data under the null and alterna+ve hypothesis? • SPSS output
• SPSS Process: Click on “analyses”, then “Compare means”, then “One-‐sample T test” , select the variable and enter into the “test variable box”, enter by typing the known popula+on mean in the window, “ Test value”.
One/Single Sample t test
One sample t test Output interpreta+on
SPSS Output Interpreta+on • How do you write the result? • A single-‐sample t test compared the mean of “X” to a popula+on mean of “Y” (state the value). A significant difference was found, (t(df)= (value of t), p < 0.0001 or the exact p value. • The sample mean of (X..value) (SD=…value) was significantly < than the popula+on mean. • Meaning – Significant-‐ sample mean is not equivalent to popula+on mean – Non-‐significant – Not a significant difference between the mean, does not mean that the means are equal.
What is p – value? • The alpha level at which we would be indifferent between accep+ng or rejec+ng the null hypothesis, given the sample data. • The alpha level at which the given value of test sta+s+c such as t would be on the borderline between the acceptance and rejec+on regions. • A p value is the probability under the null hypothesis of obtaining a test sta+s+c as extreme as or more extreme than the observed test sta+s+c. •
Independent/Two samples t Test Compares the means of two samples that are normally distributed from randomly assigned groups
Two sample or Independent sample T-‐ test • Purpose • To compare the underlying parameters of two different popula+ons, neither of whose values is assumed known. • Independent sample: Samples are independent when the data points in one sample are unrelated to the data points in the second sample • Two completely different group or dis+nct popula+on are compared. • Design: – Longitudinal study – Cross-‐sec+onal
Two sample t test • Assump+ons • Normal distribu+on – dependent must be measured in interval or ra+o scale • Independence – observa+ons are independent implies informa+on about one is unrelated to another. • Equal variance
Two sample t sta+s+c • t = (x1-‐x2) / σ√1/n1 + 1/n2 • Assuming that the underlying variance in the two groups are the same σ1=σ2= σ. The mean and the variances in the two samples are denoted by x1, x2 s12, s22, respec+vely. X1 is normally distributed with mean μ1 and variance σ 2/n1, and X2 is normally distributed with mean μ2 and variance σ 2/n2. • Since the samples are independent, x1-‐x2 is normally distributed with μ1-‐ μ2, and variance σ2 (1/n1 + 1/n2). • Equal variance: t = x1-‐x2 / SD√1/n1 + 1/n2
Vigne\e • Suppose the cholesterol levels of ten children (2-‐14 years) of whose fathers died from CAD are: 165, 170, 156, 171, 178, 179, 171, 181, 169 and 181 mg/dl; and those of ten children whose fathers are alive and have no CAD are: 160, 165, 145, 146, 152, 143, 140, 139, 160, and 141 mg/dl. • Is the underlying variance equal? Equality of spread!! • What is the ra+o of the variance?
• Are these samples independent? • Why?
• Is there a mean difference in cholesterol level comparing the two samples?
Independent Sample T test procedure Perform Normality test
Yes Perform test for equality of two variances No
Perform t test with unequal variance
Yes Perform t test with equal variance
Vigne\e • The dataset on Deep wound infec+on following spinal fusion in children with CP provided informa+on hematocrit, temperature, es+mated blood loss, and parked red blood cells. Suppose a case-‐control study was designed, and the inves+gator is interested in knowing whether or not the cases significantly differed from the controls with respect to temperature. • What test sta+s+c is appropriate for this inference? What are the assump+ons?
• Using SPSS, perform the specific test and interpret the results.
Independent/two Samples t test
SPSS Output
SPSS Output Interpreta+on • There are two components to the interpreta+on • Group sta+s+cs: • Provides the basic descrip+ve sta+s+cs for the dependent variables for each value of the independent variable (two discrete levels, 0,1) • The mean age at surgery with the CP children who were diagnosed with deep wound infec+on was 13.9 years, SD=3.1, and for the control or non-‐ cases,. Mean = 14.5 years, SD, 3.5. • Levene’s Test for equality of variance: This test indicates that the variances for the cases compared to the control do not differ significantly, F= 0.38, p = 0.54. • t test answer: T test assumes an equality of means as the null hypothesis. The last three columns on the independent sample table provide the t, df and significance (p value). There was no significant difference between the mean age of the two groups, (t( 64)=0.64, p = 0.52.
Paired/Dependent Sample T test Paired sample design-‐ when each data point of the first sample is matched and is related to a unique data point of the second sample
Paired t test formula
Paired, correlated, matched, dependent sample t test
SPSS Output
Paired t test Assump+ons • Assump+ons • Both variables (two measurements of same subject) (pre and post) are normally distributed • Are measured on interval or ra+o scales • If different scales are used, scores must be converted to z-‐score prior to t test
Paired t test Interpreta+on • Three components of the output: • Descrip+ve sta+s+cs: • Preopera+ve mean ( 77.03 degrees), SD (20.0) and SE of the 66 children with CP. • Postopera+ve mean (26.6) thoracic curve angle, SD (15.2) and SE of the 66 children with CP
• Pearson correla+on coefficient – r = 0.6, p < 0.0001. • Paired Differences: Mean (50.4 degrees), SD, SE t value (23.5), df (59), and sig (p value), < 0.0001.
View more...
Comments