Nemours Biomedical Research Statistics March 26, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.

Slides:



Advertisements
Similar presentations
COMPLETE BUSINESS STATISTICS
Advertisements

Dealing With Statistical Uncertainty
INTRODUCTION TO NON-PARAMETRIC ANALYSES CHI SQUARE ANALYSIS.
Lecture 10 Non Parametric Testing STAT 3120 Statistical Methods I.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Dealing With Statistical Uncertainty Richard Mott Wellcome Trust Centre for Human Genetics.
Nemours Biomedical Research Statistics March 19, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Nemours Biomedical Research Statistics April 16, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 14 Analysis of Categorical Data
Chapter 12 Chi-Square Tests and Nonparametric Tests
Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008.
Final Review Session.
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
Nemours Biomedical Research Statistics April 2, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Statistics for Managers Using Microsoft® Excel 5th Edition
Student’s t statistic Use Test for equality of two means
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
15-1 Introduction Most of the hypothesis-testing and confidence interval procedures discussed in previous chapters are based on the assumption that.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Nonparametrics and goodness of fit Petter Mostad
Chapter 15 Nonparametric Statistics
Looking at differences: parametric and non-parametric tests
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Statistical Methods II
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 12-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Statistical Analysis Statistical Analysis
More About Significance Tests
NONPARAMETRIC STATISTICS
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
Where are we?. What we have covered: - How to write a primary research paper.
Biostat 200 Lecture 7 1. Hypothesis tests so far T-test of one mean: Null hypothesis µ=µ 0 Test of one proportion: Null hypothesis p=p 0 Paired t-test:
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Nonparametric Statistics aka, distribution-free statistics makes no assumption about the underlying distribution, other than that it is continuous the.
1 10 Statistical Inference for Two Samples 10-1 Inference on the Difference in Means of Two Normal Distributions, Variances Known Hypothesis tests.
Biostatistics, statistical software VII. Non-parametric tests: Wilcoxon’s signed rank test, Mann-Whitney U-test, Kruskal- Wallis test, Spearman’ rank correlation.
Ordinally Scale Variables
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
MGT-491 QUANTITATIVE ANALYSIS AND RESEARCH FOR MANAGEMENT OSMAN BIN SAIF Session 26.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
Lesson 15 - R Chapter 15 Review. Objectives Summarize the chapter Define the vocabulary used Complete all objectives Successfully answer any of the review.
© Copyright McGraw-Hill 2000
Chapter 13 CHI-SQUARE AND NONPARAMETRIC PROCEDURES.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-1 Chapter 12 Chi-Square Tests and Nonparametric Tests Statistics for Managers using.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Ch11: Comparing 2 Samples 11.1: INTRO: This chapter deals with analyzing continuous measurements. Later, some experimental design ideas will be introduced.
Nonparametric Methods and Chi-Square Tests Session 5.
Chapter Outline Goodness of Fit test Test of Independence.
N318b Winter 2002 Nursing Statistics Specific statistical tests Chi-square (  2 ) Lecture 7.
NON-PARAMETRIC STATISTICS
Tuesday PM  Presentation of AM results  What are nonparametric tests?  Nonparametric tests for central tendency Mann-Whitney U test (aka Wilcoxon rank-sum.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Biostatistics Nonparametric Statistics Class 8 March 14, 2000.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Chapter 14 Nonparametric Methods and Chi-Square Tests
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric.
Objectives (BPS chapter 12) General rules of probability 1. Independence : Two events A and B are independent if the probability that one event occurs.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Nonparametric statistics. Four levels of measurement Nominal Ordinal Interval Ratio  Nominal: the lowest level  Ordinal  Interval  Ratio: the highest.
1 Underlying population distribution is continuous. No other assumptions. Data need not be quantitative, but may be categorical or rank data. Very quick.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
Slide 1 Shakeel Nouman M.Phil Statistics Nonparametric Methods and Chi-Square Tests (1) Nonparametric Methods and Chi-Square Tests (1) By Shakeel Nouman.
Hypothesis testing. Chi-square test
Nonparametric Statistics
Presentation transcript:

Nemours Biomedical Research Statistics March 26, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility

Nemours Biomedical Research Hypothesis Testing (Quantitative variable)

Nemours Biomedical Research One vs two sided tests One-sided –One direction of effect (e.g. mean efficacy of treatment group is greater than the mean efficacy of placebo group) –Greater power to detect difference in expected direction Two-sided –Effect could be in either direction (e.g. mean efficacy of treatment group is not equal to the mean efficacy of placebo group) –More conservative

Nemours Biomedical Research One vs two sided tests One groupTwo groups One sided A single mean differs from a known value in a specific direction. e.g. mean > 0 or median > 0 Two means differ from one another in a specific direction. e.g., mean 2 < mean 1 median 2 < median 1 Two sided A single mean differs from a known value in either direction. e.g., mean ≠ 0 median ≠ 0 Two means are not equal. E.g., mean 1 ≠ mean 2 median 1 ≠ median 2

Nemours Biomedical Research Single group sample - one sample t- test Test for value of a single mean E.g., to see if mean SBP of all AIDHC employees is 120 mm Hg Assumptions –Parent population is normal –Sample observations (subjects) are independent

Nemours Biomedical Research Single group sample-one sample t- test Formula Consider a sample of size n from a normal population with mean µ and variance σ 2, then the following statistic is distributed as Student’s t with (n-1) degrees of freedom.  x is the sample mean and s is the sample standard deviation

Nemours Biomedical Research One group sample - Sign Test (Nonparametric) Use: (1) Compares the median of a single group with a specified value (instead of single sample t-test). Hypothesis: H 0 :Median = c H a :Median  c Test Statistic: We take the difference of observations from median (x i - c). The number of positive difference follows a Binomial distribution. For large sample size, this distribution follows normal distribution. (Rcmdr does not have a default sign test)

Nemours Biomedical Research One group sample: Rcmdr demonstration Load data default to Rcmdr and then select- Statistics->Means->single sample t-test. From this window, select variable (e.g.hgt), alternative hypothesis, value for null hypothesis (e.g. 50). data: data$hgt t = , df = 59, p-value = alternative hypothesis: true mean is not equal to percent confidence interval: sample estimates: mean of x

Nemours Biomedical Research Two-group (independent) samples - two-sample t-statistic Use –Test for equality of two means Assumptions –Parent population is normal –Sample observations (subjects) are independent.

Nemours Biomedical Research Two-group (independent) samples - two-sample t-statistic Formula (two groups) –Case 1: Equal Population Standard Deviations: The following statistic is distributed as t distribution with (n1+n2 -2) d.f. The pooled standard deviation, n1 and n2 are the sample sizes and S 1 and S 2 are the sample standard deviations of two groups.

Nemours Biomedical Research Two-group (independent) samples - two-sample t-statistic Formula (two groups) –Case 2: Unequal population standard deviations The following statistic follows t distribution. The d.f. of this statistic is,

Nemours Biomedical Research Two-sample (independent) t-statistic Statistics->Means-> Independent sample t test From the small window, select response variable (e.g. PLUC.pre), select group variable (e.g. sex) and select alternative hypothesis type (e.g. two sided), confidence level (e.g..95), and Assume equal variance (e.g yes) Two Sample t-test data: PLUC.pre by sex t = , df = 58, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean in group f mean in group m

Nemours Biomedical Research Two-group (independent) samples- Wilcoxon Rank-Sum Test (Nonparametric) Use: Compares medians of two independent groups. Corresponds to t-test for 2 Independent sample means Test Statistic: Consider two samples of sizes m and n. Suppose N=m+n. Compute the rank of all N observations. Then, the statistic, W m = Sum of the ranks of all observations of the first variable (size m).

Nemours Biomedical Research Two-group (independent) samples- Wilcoxon Rank-Sum Test (Nonparametric) Statistics-> Nonparametric tests->Two sample Wilcoxon test -> select response variable (e.g. PLUC.pre), group variable (e.g. sex), Alternative hypothesis (e.g. two sided), Type of Test (e.g. exact). Wilcoxon rank sum test data: PLUC.pre by sex W = 439, p-value = alternative hypothesis: true location shift is not equal to 0

Nemours Biomedical Research Two-group (matched) samples - paired t-statistic Use: Compares equality of means of two matched or paired samples (e.g. pretest versus posttest) Assumptions: –Parent population is normal –Sample observations (subjects) are independent

Nemours Biomedical Research Two-group (matched) samples - paired t-statistic Formula –The following statistic follows t distribution with n-1 d.f. Where, d is the difference of two matched samples and S d is the standard deviation of the variable d.

Nemours Biomedical Research Paired t-test:Rcmdr demo Statistics -> Means->paired t-test-> pick First variable (e.g. PLUC.pre), pick second variable (e.g. PLUC.post), Alternative Hypothesis (e.g. Two sided), Confidence level (e.g. 0.95). data: data$PLUC.pre and data$PLUC.post t = , df = 59, p-value = 8.739e-07 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences

Nemours Biomedical Research Two-group (matched) samples Wilcoxon Signed-Rank Test (Nonparametric) USE: –Compares medians of two paired samples. Test Statistic –Obtain Differences of two variables, D i = X 1i - X 2i –Take Absolute Value of Differences, D i –Assign Ranks to absolute values (lower to higher), R i –Sum up ranks for positive differences (T + ) and negative differences (T - ) Test Statistic is smaller of T - or T + (2-tailed)

Nemours Biomedical Research Two-group (matched) samples Wilcoxon Signed-Rank Test (Nonparametric) Statistics -> Nonparametric tests ->Paired sample Wilcoxon test -> select first variable (e.g. PLUC. Pre) and second variable (e.g. PLUC.post), Alternative hypothesis (e.g.two sided), type of test (e.g. normal approximation) median(data$PLUC.pre - data$PLUC.post, na.rm=TRUE) # median difference [1] > wilcox.test(data$PLUC.pre, data$PLUC.post, alternative='two.sided', + paired=TRUE)

Nemours Biomedical Research Comparing more than two independent samples: F statistic (Parametric) Use: –Compare means of more than two groups –Test the equality of variances.

Nemours Biomedical Research Comparing > 2 independent samples: F statistic (Parametric) Let X and Y be two independent Chi-square variables with n 1 and n 2 d.f. respectively, then the following statistic follows a F distribution with n 1 and n 2 d.f. Let, X and Y are two independent normal variables with sample sizes n 1 and n 2. Then the following statistic follows a F distribution with n 1 and n 2 d.f. Where, s x 2 and s y 2 are sample variances of X and Y.

Nemours Biomedical Research Comparing > 2 independent samples: F statistic (Parametric) Hypotheses: H 0 : µ 1 = µ 2 =…. =µ n H a : µ 1 ≠ µ 2 ≠ …. ≠µ n  Comparison will be done using analysis of variance (ANOVA) technique.  ANOVA uses F statistic for this comparison.  The ANOVA technique will be covered in another class session.

Nemours Biomedical Research More than two independent samples: One-way analysis of variance (ANOVA) Create a new variable: PLUC.chng=PLUC.post – PLUC.pre (Data-> Manage variable in active dataset-> Compute new variable -> New variable name (on the left): PLUC.chng = PLUC.post – PLUC.pre (on the right). For ANOVA: Statistics -> means -> One-way ANOVA -> Select model, response variable (e.g. PLUC.chng), group variable (e.g. grp), pairwise comparison of means.

Nemours Biomedical Research AnovaModel.5 <- aov(PLUC.chng ~ grp, data=data) Df Sum Sq Mean Sq F value Pr(>F) > summary(AnovaModel.5) grp * Residuals Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > numSummary(data$PLUC.chng, groups=data$grp, statistics=c("mean", "sd")) mean sd n More than two independent samples: One-way analysis of variance (ANOVA) Contd.

Nemours Biomedical Research threegrp <- aov(PLUC.chng ~ grp, data=data) > summary(threegrp) Df Sum Sq Mean Sq F value Pr(>F) grp * Residuals Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > numSummary(data$PLUC.chng, groups=data$grp, statistics=c("mean", "sd")) mean sd n More than two independent samples: One-way analysis of variance (ANOVA) Contd.

Nemours Biomedical Research More than two independent samples: One-way analysis of variance (ANOVA)

Nemours Biomedical Research More than two groups: Nonparametric Kruskal-Wallis Test Compares median of three or more groups or (means of ranks of three or more groups) Rcmdr Demo: Statistics -> Nonparametric tests ->Kruskal-Wallis test and then select response and group variables etc. > kruskal.test(PLUC.chng ~ grp, data=data) Kruskal-Wallis rank sum test data: PLUC.chng by grp Kruskal-Wallis chi-squared = , df = 2, p-value =

Nemours Biomedical Research Proportion Tests Use –Test for equality of two Proportions E.g. proportions of subjects in two treatment groups who benefited from treatment. –Test for the value of a single proportion E.g., to test if the proportion of smokers in a population is some specified value (less than 1)

Nemours Biomedical Research Proportion Tests Formula –One Group: –Two Groups:

Nemours Biomedical Research Proportion Test Statistics-> proportions -> single sample (e.g.sex) or two sample-> Select, variable, Alternative hypothesis, null hypothesis, Confidence Level, Type of test. >.Table sex f m 30 > binom.test(rbind(.Table), alternative='two.sided', p=.5, conf.level=.95) Exact binomial test data: rbind(.Table) number of successes = 30, number of trials = 60, p-value = 1 alternative hypothesis: true probability of success is not equal to percent confidence interval: sample estimates: probability of success 0.5

Nemours Biomedical Research Chi-square statistic USE –Testing the population variance σ 2 = σ 0 2. –Testing the goodness of fit. –Testing the independence/ association of attributes Assumptions –Sample observations should be independent. –Cell frequencies should be >= 5. –Total observed and expected frequencies are equal

Nemours Biomedical Research Chi-square statistic Formula: If x i (i=1,2,…n) are independent and normally distributed with mean µ and standard deviation σ, then, If we don’t know µ, then we estimate it using a sample mean and then,

Nemours Biomedical Research Chi-square statistic For a contingency table, we use the following chi- square test statistic,

Nemours Biomedical Research Chi-square statistic Male O(E) Female O(E) Total Group 19 (10)11 (10)20 Group 28 (10)12 (10)20 Group 311 (10)9(10)

Nemours Biomedical Research Chi-square statistic – calculation of expected frequency To obtain the expected frequency for any cell, use: Corresponding (row total X column total) / grand total E.g: cell for group 1 and female, substituting: (30 X 20 / 60) = 10

Nemours Biomedical Research Chi-square statistic:Rcmdr demonstration Statistics->Contingency tables -> Two way table -> Pick row and column variable, select type of cell percentage you want (e.g. row), hypothesis tests (e.g. chi-square) > rowPercents(.Table) # Row Percentages grp sex Total Count f m >.Test <- chisq.test(.Table, correct=FALSE) >.Test Pearson's Chi-squared test data:.Table X-squared = 1.2, df = 2, p-value =

Nemours Biomedical Research Thank you