CHP400: Community Health Program - lI Research Methodology. Data analysis Hypothesis testing Statistical Inference test t-test and 22 Test of Significance
2 test Test of Significance Content Definition of Hypothesis Statistical Hypotheses Hypothesis testing Performing the t – test Interpretation of the t-test The contingency table Performing the chi square test The assumptions / Limitations of the Chi square test Causal Associations
A tentative explanation for an observation, phenomenon, or scientific problem that can be tested by further investigation. Something taken to be true for the purpose of argument or investigation. A mere assumption or guess Statistical Hypothesis Definition
Since that is often impractical, researchers typically examine a random sample from the population. Statistical Hypotheses The best way to determine whether a statistical hypothesis is true would be to examine the entire population. If sample data are not consistent with the statistical hypothesis, the hypothesis is rejected.
Hypothesis testing is the use of statistics to determine the probability that a given hypothesis is true. Hypothesis testing consists of four steps. Statistical Hypothesis testing 1- Null hypothesis: H 0 and Alternative hypothesis: H A 2- Test statistic: 3- Compute the “ -value” 4- Compare the ( )-value to an acceptable significance value( )
Statistical Hypothesis testing 1- Null hypothesis: H 0 and Alternative hypothesis: H A Formulate the null hypothesis (commonly, that the observations are “not different” or” not associated”) 2- Test statistic: 3- Compute the “P-value” 4- Compare the ( )-value to an acceptable significance value( ) and the alternative hypothesis (commonly, that the observations show a “real difference” or “association”)
Statistical Hypothesis testing 1- Null hypothesis: H 0 and Alternative hypothesis: H A 2- Test statistic: Identify a “statistical test” that can be used to assess the truth of the null hypothesis( 2 test, t-test etc.); and calculate the “test statistic” 3- Compute the “P-value” 4- Compare the ( )-value to an acceptable significance value( )
Statistical Hypothesis testing 1- Null hypothesis: H 0 and Alternative hypothesis: H A 2- Test statistic: 3- Compute the “P-value” Compute the -value, which is the probability that a test statistic equals observed value or even more extreme would be obtained assuming that the null hypothesis were true. The smaller the -value, the stronger the evidence against the null hypothesis. 4- Compare the ( )-value to an acceptable significance value( )
Statistical Hypothesis testing 1- Null hypothesis: H 0 and Alternative hypothesis: H A 2- Test statistic: 3- Compute the “P-value” 4- Compare the ( )-value to an acceptable significance value( ) Compare the -value to an acceptable significance value (sometimes called an alpha value). If, that the observed effect is statistically significant, the null hypothesis is ruled out, and the alternative hypothesis is valid
The t-test Significance Test of Significance Test of 1.Test for single mean Whether the sample mean is equal to the predefined population mean ? 2. Test for difference in means Whether “the mean energy expenditure ” in obese women is equal to “the mean energy expenditure ” in lean women? 3. Test for paired observation Whether the treatment conferred any significant benefit ?
The t-test Test of Significance The t-test Examines the difference between means 2 nd group mean Is there a difference? 1 st group mean
The t-test Test of Significance medium variability high variability low variability The difference in mean is the same for all three cases What does difference mean? Which one shows the greatest difference?
The t-test Test of Significance Difference between means Sample size Variability of data t-test t + + What does difference mean?
The t-test Test of Significance a statistical difference is a function of the difference between means relative to the variability = difference between group means Variability of groups = = X 12 X X 12 X ( ) SE t-value = XX 12 n1n1 n2n2 What does difference mean?
The t-test Test of Significance Given below are the 24 hrs total energy expenditure (MJ/day) in groups of lean and obese women. Examine whether the obese women’s mean energy expenditure is significantly higher ?. Lean t-test for difference in means Obese
The t-test Test of Significance Null Hypothesis( ) Obese women’s mean energy expenditure is equal to the lean women’s mean energy expenditure. Data Summary lean Obese N S X t-test for difference in means Solution H0H0
The t-test Test of Significance = 0.05 df = = 20 Critical Value(s): XX XX Solution t-test for difference in means H 0 : = 0 H A : ≠ 0
The t-test Test of Significance α (2 tail) df t-test for difference in means
The t-test Test of Significance = 0.05 df = = 20 Critical Value(s): (tab t = 20 df = t 0.05,20 = 2.086) XX XX Solution t-test for difference in means H 0 : = 0 H A : ≠ 0 (2.086)
The t-test Test of Significance Calculating the Test Statistic: = XX 12 n1n1 t S2S2 p = S2S2 1 (n 1 -1)+(n 2 -1) 2 S2S2 p S2S2 2 S2S2 1 n1n1 n2n2 :pooled-variance : variance of sample 1 : variance of sample 2 :size of sample 1 :size of sample 2 n2n2 t-test for difference in means S2S2
The t-test Test of Significance S2S2 p = S2S2 1 (n 1 -1)+(n 2 -1) S2S2 2 First, estimate the common variance as a weighted average of the two sample variances using the degrees of freedom as weights Calculating the Test Statistic: = (13-1)+(9-1) = t-test for difference in means (13-1) (9-1)
The t-test Test of Significance Calculating the Test Statistic: = XX 12 n1n1 t = 8.1 – n2n _ 3.82= t-test for difference in means
The t-test Test of Significance Inference: The calculated t (3.82) is higher than table t (at 0.05, 20. ie 2.086). This implies that there is an evidence that the mean energy expenditure in obese group is significantly (p<0.05) higher than that of lean group. t-test for difference in means
2 test Test of Significance A physician wants to know whether the proportion of esophageal cancer diagnosed as multiple primary tumors (MPT) differs between females and males. He selected a random sample of 100 cases of esophageal cancer, 60 were males and 40 were females. Of the 60 male esophageal cancer patients, 40 were diagnosed as MPT. Of the 40 female esophageal cancer patients, 10 were diagnosed as MPT. Chi square test
2 test Test of Significance Exposure (estrogen) Outcome (cancer) Total YesNo Yes No Total Out of 30 women who had uterine cancer, 20 claimed to have used estrogens. Out of 30 women without uterine cancer 10 claimed to have used estrogens. Chi square test
2 test Test of Significance Exposure (estrogen) Outcome (cancer) Total YesNo Yes No Total Out of 30 women who had uterine cancer, 20 claimed to have used estrogens. Out of 30 women without uterine cancer 10 claimed to have used estrogens. Chi square test
2 test Test of Significance A: Calculating 2 value 1.Calculate the expected frequency (E) for each cell 2.For each cell subtract the expected frequency from the observed frequency (O): 3. For each cell, square the result of (O-E) and divide by the expected frequency (E): Steps Chi square test row total x column total total number of observation E = O – E (O – E) E
2 test Test of Significance Exposure (estrogen) Outcome(cancer) Total YesNo Yes (15) (15)30 No (15) (15)30 Total Out of 30 women who had uterine cancer, 20 claimed to have used estrogens. Out of 30 women without uterine cancer 10 claimed to have used estrogens. Steps Chi square test
2 test Test of Significance 4. Add the results of step (3) for all the cells Formula: 2 = [ ( O - E ) 2 / E] = [(20-15) 2 /15] + [(10-15) 2 //15] + [(10-15) 2 /15] + [(20-15) 2 /15] = = 6.68 B: Deciding p value 1. Calculate degrees of freedom (r-1) (c-1) df = (2-1) (2-1) = 1 x 1 =1 2. Looking at 2 table Steps Chi square test
2 test Test of Significance df Steps Chi square test
2 test Test of Significance Steps Chi square test Inference: The calculated 2 (6.68) is higher than table 2 (at 0.05, 1. ie 3.841). This implies that there is an evidence that there is association between use of estrogens and uterine cancer
2 test Test of Significance Chi square test Data is from a random sample. A sufficiently large sample size is required (at least 20) Actual count data (not percentages) All expected counts are All expected counts are ≥1 expected counts are ≥ 80%expected counts are ≥5 Observations must be independent. Does not prove causality. Assumptions / Limitations
2 test Test of Significance Effect of mother ’ s hand washing before preparing feed on Children ’ s Diarrhea (If a cohort study) Wash Hands History of Diarrhea in last two weeks Risk Ratio YesNo Yes10201 No Risk of developing Diarrhea is 2.25 times higher among the children of the mothers who do not wash hands before preparing feed as compared to the ones who wash the hands. Chi square test
2 test Test of Significance Chi square test Effect of mother ’ s hand washing before preparing feed on Children ’ s Diarrhea (If a Case – control or Cross sectional study) Wash Hands History of Diarrhea in last two weeks Odds Ratio YesNo Yes10201 No1556 Odds of not washing hands by mothers before preparing feed is 6 times higher among the children who had diarrhea, as compared to the children who did not had diarrhea.
2 test Test of Significance Causal Associations Relationship between variables Relationship between variables Not statistically associated Not statistically associated Non-causal Causal Indirectly causal Indirectly causal Statistically associated Statistically associated Directly causal Directly causal