660 likes | 835 Views
Basic Statistics II. Significance/hypothesis tests. RCT comparing drug A and drug B for the treatment of hypertension. 50 patients allocated to A 50 patients allocated to B Outcome = systolic BP at 3 months. Results. Group A Mean = 145, sd = 9.9 Group B Mean = 135, sd = 10.0.
E N D
RCT comparing drug A and drug B for the treatment of hypertension • 50 patients allocated to A • 50 patients allocated to B • Outcome = systolic BP at 3 months
Results Group A Mean = 145, sd = 9.9 Group B Mean = 135, sd = 10.0
Null hypothesis : “μ (A) = μ (B)” [ie. difference equals 0] Alternative hypothesis : “μ (A) ≠ μ(B)” [ie. difference doesn’t equal zero] [whereμ = population mean]
Statistical problem When can we conclude that the observed difference mean(A) - mean(B) is large enough to suspect that μ(A) - μ(B) is not zero?
P-value : “probability of obtaining observed data if the null hypothesis were true” [eg. if no difference in systolic BP between two groups]
Test Statistic • Numerical value which can be compared with a known statistical distribution • Expressed in terms of the observed data and the data expected if the null hypothesis were true
Test statistic [mean (A) – mean (B)] / sd [mean(A)-mean(B)] Under null hypothesis this ratio will follow a Normal distribution with mean = 0 and sd = 1
Hypertension example Test statistic = [mean (A) – mean (B)] / sd [mean(A)-mean(B)] = [ 145 – 135 ] / 1.99 = 5 → p <0.001
Interpretation Drug B results in lower systolic blood pressure in patients with hypertension than does Drug A
Two-sample t-test Compares two independent groups of Normally distributed data
Null hypothesis : “μ (A) = μ (B)” [ie. difference equals 0] Alternative hypothesis : “μ (A) ≠ μ(B)” [ie. difference doesn’t equal zero] Two-sided test
Null hypothesis : “μ (A) = μ (B) or μ (A) < μ (B) ” Alternative hypothesis : “μ (A) > μ(B)” One-sided test
A one-sided test is only appropriate if a difference in the opposite direction would have the same meaning or result in the same action as no difference
Paired-sample t-test Compares two dependent groups of Normally distributed data
Paired-sample t-test Mean daily dietary intake of 11 women measured over 10 pre-menstrual and 10 post-menstrual days
Dietary intake example Pre-menstrual (n=11): Mean=6753kJ, sd=1142 Post-menstrual (n=11): Mean=5433kJ, sd=1217 Difference Mean=1320, sd=367
Dietary intake example Test statistic = 1320/[367/sqrt(11)] = 11.9 p<0.001
Dietary intake example Dietary intake during the pre-menstrual period was significantly greater than that during the post-menstrual period
The equivalent non-parametric tests Mann-Whitney U-test Wilcoxon matched pairs signed rank sum test
Non-parametric tests Based on the ranks of the data Use complicated formula Hence computer package is recommended
Type I error Significant result when null hypothesis is true (0.05) Type II error Non-significant result when null hypothesis is false [Power = 1 – Type II]
The chi-square test Used to investigate the relationship between two qualitative variables The analysis of cross-tabulations
The chi-square test Compares proportions in two independent samples
Chi-square test example In an RCT comparing infra-red stimulation (IRS) with placebo on pain caused by osteoarthritis, 9/12 in IRS group ‘improved’ compared with 4/13 in placebo group
Chi-square test example Improve? Yes No Placebo 4 9 13 IRS 9 3 12 13 12 25
Placebo : 4/13 = 31% improve IRS: 9/12 = 75% improve
Cross-tabulations The chi-square test tests the null hypothesis of no relationship between ‘group’ and ‘improvement’ by comparing the observed frequencies with those expected if the null hypothesis were true
Cross-tabulations Expected frequency = row total x col total grand total
Chi-square test example Improve? Yes No Placebo 4 9 13 IRS 9 3 12 13 12 25 Expected value for ‘4’ = 13 x 13 / 25 = 6.8
Expected values Improve? Yes No Placebo 6.8 6.2 13 IRS 6.2 5.8 12 1312 25
Test Statistic = (observed freq – expected freq)2 expected freq
Test Statistic = (O – E)2 E = (4 - 6.8)2/6.8 + (9 – 6.2)2/6.2 + (4 - 6.8)2/6.8 + (9 – 6.2)2/6.2 = 4.9 → p=0.027
Chi-square test example Statistically significant difference in improvement between the IRS and placebo groups
Small samples The chi-square test is valid if: at least 80% of the expected frequencies exceed 5 and all the expected frequencies exceed 1
Small samples If criterion not satisfied then combine or delete rows and columns to give bigger expected values
Small samples Alternatively: Use Fisher’s Exact Test [calculates probability of observed table of frequencies - or more extreme tables-under null hypothesis]
Yates’ Correction Improves the estimation of the discrete distribution of the test statistic by the continuous chi-square distribution
Chi-square test with Yates’ correction Subtract ½ from the O-E difference (|O – E|-½)2 E
McNemar’s test Compares proportions in two matched samples
McNemar’s test example Severe cold age 14 Yes No Severe Yes 212 144 356 cold No 256 707 963 age 468 851 1319 12
McNemar’s test example Null hypothesis = proportions saying ‘yes’ on the 1st and 2nd occasions are the same the frequencies for ‘yes,no’ and ‘no,yes’ are equal
McNemar’s test Test statistic based on observed and expected ‘discordant’ frequencies Similar to that for simple chi-square test
McNemar’s test example Test statistic = 31.4 => p <0.001 Significant difference between the two ages