380 likes | 554 Views
بسم الله الرحمن الرحيم. Hypothesis Testing. Dr. Laila Mohamed Nofal Professor of Biostatistics High Institute of Public Health University of Alexandria. Testing of Hypothesis. Testing of Hypothesis is done by means of tests of significance.
E N D
Hypothesis Testing Dr. Laila Mohamed Nofal Professor of Biostatistics High Institute of Public Health University of Alexandria
Testing of Hypothesis Testing of Hypothesis is done by means of tests of significance. The whole problem of testing is one of the problems resulting from the use of samples instead of performing comprehensive survey on the population. if repeated samples are taken from the same population the mean will be found to differ between samples and probably also differs from the true mean of the total population from which the sample was drawn.
Why should we test significance? Question : Is there a difference between the mean weight of men and women Group 1 (Men) Sample size (n)=12 Mean weight=80 Kg Group 2 (Women) Sample size (n)=10 Mean weight=63 Kg The difference between sample means (80-63) = 17
Why should we test significance? Two possibilities for this observed difference due to chance while in reality there is no difference between males and females in the population, but the sample of males just happened to differ from the sample of females. a true difference which also exists in the total population from which the sample was drawn
Tests of Significance • Tests of significance tests whether two groups are statistically different from each other • Such a comment means that the observed difference is too large to be explained by chance alone. • Statistically different? = Truly different? • Not just different due to chance
Tests of Significance • We do not need a statistical test of significance, if • we can collect data from all subjects in a population
Level of Significance Truth is something which is most likely to be true and 100% certainty is impossible. • If we are 95% sure, there is a less than 5% likelihood that the observed difference occurred by chance. • We usually choose a commonly accepted level of allowing that our conclusion may have occurred by chance, 0.05 (5%), 0.01 (1%) . This is called the chosen significance level (also called alpha level) The term confidence level may be used as well (95%, 99%). • We usually accept the 5% level of significance in scientific studies
Tests of Significance (Comparing two groups)
The following steps should be followed: Determine the appropriate statistical test to use Determine the computed value (from formula) Determine the critical value (from table) Draw your conclusion If computed value >= critical value significant If computed value < critical value not significant How to test significance?
Choosing a Statistical Test The selection of a statistical test depends on Type of Variable Numerical Categorical Shape of Distribution (in case of numeric variables) Normal (Parametric Statistics) Not normal (Non parametric Statistics)
Choosing a Statistical Test Data set Independent - outcome measured in 2 separate groups of individuals Dependent or related (paired observations) - Repeated measurements made on the same subject Study group Intervention Study group Before after Compare
Choosing a Statistical Test(for comparison between 2 groups) Parametric Statistics Non Parametric Statistics
Numerical Data Normally distributed (Parametric Statistics)
1- Comparing two independent groups Independent t test
Independent t- test • The independent t test is a useful technique for comparing two independent (seperate) groups when variable is numerical and normally distributed. The comparison will provide you with a value for evaluating whether the difference between two means is statistically significant.
Computed t- value = mean of the first group = mean of the second group n1, n2 = sample size in 1st and 2nd group
Critical t- value • Critical t from table is detected • at degree of freedom = n1+ n2 - 2 • level of significance usually 5%
Sample of size 25 was selected from healthy population, their mean SBP =125 mm Hg with SD of 10 mm Hg . Another sample of size 17 was selected from the population of diabetics, their mean SBP was 132 mmHg, with SD of 12 mm Hg . If you know that SBP is normally distributed test whether there is a significant difference in mean SBP of diabetics and healthy individual at 5% level of significance Example
Objective: comparing mean SBP in 2 separate groups. Type of variable: numerical. Shape of distribution: normal Data set: independent data Appropriate test : independent t test To Determine the Appropriate Statistical Test
S1 = 12 S2 =11
Critical t at df = 40 & 5% level of significance = 1.96 Conclusion: Since the computed t is larger than critical t so there is a significant difference between mean SBP of healthy and diabetic samples at 5 %.
The following are descriptive statistics regarding maximum heart rate of athletics group (A) and non athletics group (B) Example (2): Using 5% level of significance, test whether there is a difference in the heart rates between group A and B given that heart rate is normally distributed
Objective: comparing mean heart rate in 2 separate groups. Type of variable: numerical. Shape of distribution: normal Data set: independent data Appropriate test : independent t test To Determine the Appropriate Statistical Test
Answer: S1 = 10S2 =9
df = n1+n2-2 = 30+35-2 = 63Critical t at df=63 & 5% level of significance = 2.000 Conclusion: Since the computed t is greater than critical t so there is a significant difference at 5% level of significance
2-Comparing two dependent groups Paired t test
Paired t- test(t- difference) The paired t-test is applicable for data collected in a pre-post (before and after) kind of situation. Example, mean SBP before and after intake of drug.
di = difference (after-before) Sd = standard deviation of difference n = sample size Critical t from table at df = n-1
The following data represents the reading of SBP before and after administration of certain drug. Test whether the drug has an effect on SBP at 5% level of significance given that difference in SBP is normally distributed Example
Objective: comparing mean SBP before and after administration of drug. Type of variable: numerical. Shape of distribution: normal Data set: paired data Appropriate test : paired t test To Determine the Appropriate Statistical Test
Critical t at df = 6-1 = 5 and using 5% level of significance =2.571 Conclusion: Since computed t is < critical t so there is no significant difference between mean SBP before and after administration of drug at 5% level of significance. 38