1 Statistics Achim Tresch Gene Center LMU Munich.

Slides:



Advertisements
Similar presentations
2013/12/10.  The Kendall’s tau correlation is another non- parametric correlation coefficient  Let x 1, …, x n be a sample for random variable x and.
Advertisements

Introduction to Statistics
1 Statistics Achim Tresch UoC / MPIPZ Cologne treschgroup.de/OmicsModule1415.html
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Significance Testing Chapter 13 Victor Katch Kinesiology.
EPIDEMIOLOGY AND BIOSTATISTICS DEPT Esimating Population Value with Hypothesis Testing.
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
Evaluating Hypotheses
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Basic Business Statistics.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Inferences About Process Quality
BCOR 1020 Business Statistics Lecture 18 – March 20, 2008.
Chapter 9 Hypothesis Testing.
Chapter 8 Introduction to Hypothesis Testing
Statistics for Managers Using Microsoft® Excel 5th Edition
Review for Exam 2 Some important themes from Chapters 6-9 Chap. 6. Significance Tests Chap. 7: Comparing Two Groups Chap. 8: Contingency Tables (Categorical.
Sample Size Determination Ziad Taib March 7, 2014.
Descriptive Statistics  Summarizing, Simplifying  Useful for comprehending data, and thus making meaningful interpretations, particularly in medium to.
1. Statistics: Learning from Samples about Populations Inference 1: Confidence Intervals What does the 95% CI really mean? Inference 2: Hypothesis Tests.
AM Recitation 2/10/11.
Hypothesis Testing:.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Chapter 10 Hypothesis Testing
Overview Definition Hypothesis
Confidence Intervals and Hypothesis Testing - II
1 Statistics Achim Tresch UoC / MPIPZ Cologne treschgroup.de/OmicsModule1415.html
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Business Statistics,
Fundamentals of Hypothesis Testing: One-Sample Tests
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University ECON 4550 Econometrics Memorial University of Newfoundland.
Describing distributions with numbers
Chapter 1 Descriptive Analysis. Statistics – Making sense out of data. Gives verifiable evidence to support the answer to a question. 4 Major Parts 1.Collecting.
Statistical Analysis Statistical Analysis
Inference in practice BPS chapter 16 © 2006 W.H. Freeman and Company.
14. Introduction to inference
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
Week 8 Fundamentals of Hypothesis Testing: One-Sample Tests
Jan 17,  Hypothesis, Null hypothesis Research question Null is the hypothesis of “no relationship”  Normal Distribution Bell curve Standard normal.
LECTURE 19 THURSDAY, 14 April STA 291 Spring
Hypothesis Testing Hypothesis Testing Topic 11. Hypothesis Testing Another way of looking at statistical inference in which we want to ask a question.
Describing distributions with numbers
Biostatistics Class 6 Hypothesis Testing: One-Sample Inference 2/29/2000.
Review of Chapters 1- 6 We review some important themes from the first 6 chapters 1.Introduction Statistics- Set of methods for collecting/analyzing data.
Statistics - methodology for collecting, analyzing, interpreting and drawing conclusions from collected data Anastasia Kadina GM presentation 6/15/2015.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.4 Analyzing Dependent Samples.
Review Hints for Final. Descriptive Statistics: Describing a data set.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Lecture 9 Chap 9-1 Chapter 2b Fundamentals of Hypothesis Testing: One-Sample Tests.
Chapter 20 Testing Hypothesis about proportions
Medical Statistics as a science
Introduction to Inference: Confidence Intervals and Hypothesis Testing Presentation 8 First Part.
Introduction to Inference: Confidence Intervals and Hypothesis Testing Presentation 4 First Part.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Stats Lunch: Day 3 The Basis of Hypothesis Testing w/ Parametric Statistics.
© Copyright McGraw-Hill 2004
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Applied Quantitative Analysis and Practices LECTURE#14 By Dr. Osman Sadiq Paracha.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
LIS 570 Summarising and presenting data - Univariate analysis.
+ Unit 6: Comparing Two Populations or Groups Section 10.2 Comparing Two Means.
Hypothesis Tests. An Hypothesis is a guess about a situation that can be tested, and the test outcome can be either true or false. –The Null Hypothesis.
Chapter 6: Descriptive Statistics. Learning Objectives Describe statistical measures used in descriptive statistics Compute measures of central tendency.
Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 8 th Edition Chapter 9 Hypothesis Testing: Single.
Describing Data Week 1 The W’s (Where do the Numbers come from?) Who: Who was measured? By Whom: Who did the measuring What: What was measured? Where:
Describing Data: Summary Measures. Identifying the Scale of Measurement Before you analyze the data, identify the measurement scale for each variable.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 FINAL EXAMINATION STUDY MATERIAL III A ADDITIONAL READING MATERIAL – INTRO STATS 3 RD EDITION.
Two-Sample Hypothesis Testing
APPROACHES TO QUANTITATIVE DATA ANALYSIS
Georgi Iskrov, MBA, MPH, PhD Department of Social Medicine
Georgi Iskrov, MBA, MPH, PhD Department of Social Medicine
Presentation transcript:

1 Statistics Achim Tresch Gene Center LMU Munich

2

3 Pope Benedikt XVI Andrej Kolmogoroff Two ways of dealing with uncertainty

4 Topics I.Descriptive Statistics II.Test theory III. Common tests IV. Bivariate Analysis V.Regression

5 I. Description Tables Figures and graphical presentation Interpretation „If you don‘t know, you have to believe“ Pan Tau „I strongly believe the Irak owns weapons of mass destruction“ George W. Bush

6 What is „data“? Cases (Samples, Observations)Endpoints (Variables)Realizations (instances,values) … The sample/ the sample population ⊆ population A collection of observations of a similar structure

7 Different Scales of a Variable Categorial Variables Have only a finite number of instances: Male/female; Mon/Tue/…/Sun Continuous Variables Can take values in an interval of the real numbers E.g. blood pressure [mmHg], costs [€] Nominal data: Categorial variables without a given order E.g. eye color [brown, blue, green, grey] Special Case: Binary (=dichotomic) variables (yes/no, 0/1…) Ordinal data: Instances are ordered in a natural way E.g. tumor grade [I, II, III, IV], rank in a contest (1,2,3,…)

8 85% shinier hair! I. Description Problem: It is often difficult to map a variable to an appropriate scale: E.g. happiness, pain, satisfaction, social status, anger -> Check whether your choice of scale is meaningful!

9 Value ABAB0  (absolute) frequency relative frequency 44%11%5%40%100% Always list absolute frequencies! Do not list relative frequencies in percent if the sample size is small (n < 20) Do not use decimal digits in percent numbers for n<300 „Side effects were observed in 14,2857% of all cases“ Nonsense, we conclude that n=7! Description of a categorial variable: Tables Example: Blood antigens (ABO), n = 188 samples I. Description

10 % Description of a categorial variable: Barplot I. Description

11 Description of continuous data: Histogram I. Description

12 The size of the bins (= width of the bars) is a matter of choice and has to be determined sensibly! 50 bins 4 Balken 12 bins I. Description

13 Caution: Data will be smoothed automatically. This is very suggestive and blurs discontinuities in a distribution. I. Description Description of continuous data: Density plot

14 The most important one: The Gaussian (normal) distribution Expectation value Standard- deviation I. Description C.F Gauss ( ): Roughly speaking, continuous variables that are the (additive) result of a lot of other random variables follow a Gaussian distribution. -> It is often sensible to assume a gaussian distribution for continuous variables.

15 Measures of Location, Scale and Scatter Mean: sum of all observations / number of samples Ex.: observations: 2, 3, 7, 9, 14 sum: = 35 # observations: 5 Mean: 35/5 = 7 Median: A number M such that 50% of all observations are less than or equal to M, and 50% are greater than or equal to M. (Q: What if #observations is even?) 50% I. Description

Mode: A value for which the density of the variable reaches a local maximum. If there is only one such value, the distribution is called unimodal, otherwise multimodal. Special case: bimodal) 16 Mean Median I. Description Description of Location, Scale and Scatter

17 Distribution Shapes Symmetric Mean  Median Skewed to the right Median << Mean Skewed to the left Mean << Median I. Description

18 The median should be preferred to the mean if the ditribution is very asymmetric there are extreme outliers The skewness g of the distribution ranges between –1 und +1, i.e. the distribution is approx. symmetric. skewness g > 0 skewness g < 0 The mean is more „precise“ than the median if the distribution is approximately normal Rule of thumb: Right skew: Left skew: I. Description

19 How would you describe this distribution? I. Description

20 „…it showed a giant boa swallowing an elephant. I painted the inside of the boa to make it visible to the adults. They always need explanations.“ Antoine de Saint-Exupéry, Le petit prince Unexpected distributions have unexpected causes! I. Description

21 More Location measures Quantile: A q-quantile Q (0≤q≤1) splits the data into a fraction of q points below or equal to Q and a fraction of 1-q points above or equal to Q. 50% Median = 50%-quantile 25% 1.quartile = 25%-quantile 25% 3.quartile = 75%-quantile 1-quantile = maximum 0-quantile = minimum I. Description

22 The five-point Summary and the Boxplot I. Description

23 Span: Maximum - Minimum Interquartile range (IQR): 3. quartile - 1. quartile Mesures of Variation I. Description

24 How far do the observations scatter around their „center“(=measure of location)? Measures of Variation large variation small variation Location measure e.g.: location = Median variation = 3.Quartil – 1.Quartil = Interquartilabstand (IQR) I. Description

25 Measures of Variation e.g.: location = median variation = mean deviation (MD) from = e.g.: location = median variation = (median absolute deviation,MAD) from I. Description

26 Mean ± s contains ~68% of the data Mean ± 2s ´´ ~95% ´´ Mean ± 3s ´´ ~99.7% ´´ x-s x x+s Measures of Variation Numbers for Gaussian variables: z.B.: location = mean variation = mean squared deviation from = =variance (v) Or:variation = square root of the variance = standard deviation (s, std.dev) I. Description

27 Histogram/Density Plot vs. Boxplot Boxplot contains less information, but it is easier to interpret. I. Description

28 Multiple Boxplots I. Description Sample: 2769 schoolchildren

29 Always report the sample size! a)numerical Median, Q 1, Q 3, Min., Max. (5-summary) for symmetric distr. alternatively: mean, standard deviation b)graphical Boxplots, histograms and/or density plots c) verbal e.g. „Blood pressure was reduced by 12 mmHg (Interquartile range: 8 to 18 mmHg = 10mmHg), whereas the reduction in the placebo group was only 3 mmHg (IQR: –2 to 4 mmHg = 6mmHg).“ Summary I. Description

30 Cross Table PersonMedicationResponse AVerumyes BPlacebono Two categorial variables: Cross Tables Data I. Description

31 Cross Table values of variable 2 values of variable 1 (potential causes) (potential effects) I. Description Two categorial variables: Cross tables PersonMedicationResponse AVerumyes BPlacebono Data

32 Cross Table Response yesno Medi- cation Verum Placebo values of variable 2 values of variable 1 (potential causes) (potential effects) Each case is one count in the table I. Description Two categorial variables: Cross tables PersonMedicationResponse AVerumyes BPlacebono Data

33 Cross Table Response yesno Medi- cation Verum10 Placebo01 values of variable 2 values of variable 1 (potential causes) (potential effects) I. Description Two categorial variables: Cross tables Each case is one count in the table PersonMedicationResponse AVerumyes BPlacebono Data

34 Cross Table Response yesno Medi- cation Verum10 Placebo01 values of variable 2 values of variable 1 (potential causes) (potential effects) The most common question is: Are there differences between █ and █ ? I. Description Two categorial variables: Cross tables

35 Absolute number, row-, column percent Response Total yesno Medi- cation Verum 20 50%, 67% 20 50%, 40% 40 50% Placebo 10 25%, 33% 30 75%, 60% 40 50% Total30, 37%50, 63%80, 100% Cross Table: n = 80 cases I. Description Two categorial variables: Cross tables

36 What‘s bad about this table? I. Description Two categorial variables: Cross tables

37 Cross tables: Independent vs. paired data independent data paired data PersonMedicationResponse AVerumyes BPlacebono PersonMedic.: VerumMedic.: Placebo Ayes B no Paired data: One object (or two closely related objects) serves for the measurement of two variables of the same kind. Exercise: The influence of diet on body height is assessed in 1) a study with 100 randomly picked subjects. 2) a study with 50 identical twins that grew up separately. Write down the cross tables. Which study is probably more informative? I. Description

38 Cross Table Medic.: Placebo yesno Medic.: Verum yes11 no00 values of variable 2 values of variable 1 I. Description Cross tables: Paired data paired data PersonMedic.: VerumMedic.: Placebo Ayes B no

39 Kreuztabelle Medic.: Placebo yesno Medic.: Verum yes11 no00 values of variable 2 values of variable 1 A typical question is: concordant observations discordant observations Are the observations concordant or discordant? Is there a particularly large number in █ or █ ? I. Description Cross tables: Paired data

40 Measure in the sample Measure in the population? Variance? Confidence intervals? Estimation, Regression: I. Description Difference in the sample Difference in the population? Probability of a false call? Significance Testing: Induction from the sample to the population

41 What allows us to conclude from the sample to the population? The sample has to be representative (figures about drug abuse of students cannot be generalized to the whole population of Germany) How is representativity achieved? Large sample numbers Random recruitment of samples from the population E.g.: Dial a random phone number. Choose a random name from the register of birth (Advantages/Disadv.?) Randomization: Random allocation of the samples to the different experimental groups I. Description

42 Confidence intervals 95%-Confidence interval: An estimated interval which contains the „true value“ of a quantity with a probability of 95%. 24,3 ____________________________________ () ,5 X Interval estimate Point estimate (e.g. % votes for the SPD in the EU elections) ( 1 – α ) – Conficence interval: An estimated interval which contains the „true value“ of a quantity with a probability of (1 – α). 1 – α = confidence level, α = error probability Use confidence intervals with caution! I. Description

43 A non-sheep detector Training:Measure the length of all sheep that cross your way II. Testing

44 Training:Measure the length of all sheep that cross your way. Determine the distribution of the quantity of interest. A non-sheep detector II Testing

45 Test phase: For any unknown animal, test the hypothesis that it is a sheep. Measure ist length and compare it to the learned length distribution of the sheep. If its length is „out of bounds“, the animal will be called a non-sheep (rejection of the hypothesis). Otherwise, we cannot say much (non-rejection). A non-sheep detector Not a sheep II Testing

46 Advantage of the method: One does not need to know much about sheep. Disadvantage: It produces errors… True Negatives Negatives calls Positive calls Decision boundary True Positives False Positives False Negatives II Testing A non-sheep detector

47 Statistical Hypothesis Testing State a null hypothesis H 0 („nothing happens, there is no difference…“) Choose an appropriate test statistic (the data- derived quantity that finally leads to the decision) This implicitly determines the null distribution (the distribution of the test statistic under the null hypothesis). II Testing

48 Statistical Hypothesis Testing Stats an alternative hypothesis (e.g. „the test statistic is higher than expected under the null hypothesis“) Determine a decision boundary. This is equivalent to the chioce of a significance level α, i.e. the fraction of false positive calls you are willing to accept. α d II Testing Acceptance region Rejection region

49 Statistical Hypothesis Testing α d Calculate the actual value of the test statistic in the sample, and make your decision according to the prespecified(!) decision boundary. Keep H 0 (no rejection) Reject H 0 (assume the alternative hypothesis) II Testing

50 0 d Good statistic Good test statistics, bad test statistics Accept null hypothesis Reject null hypothesis Null hypothesis is true right decision Typ I error (False Positive) Alternative is true Typ II error (False Negative) right decision Distribution of the test statistic under the null hypothesis Distribution of the test statistic under the alternative hypothesis II Testing

0 d Bad statistic II Testing Distribution of the test statistic under the null hypothesis Distribution of the test statistic under the alternative hypothesis Accept null hypothesis Reject null hypothesis Null hypothesis is true right decision Typ I error (False Positive) Alternative is true Typ II error (False Negative) right decision Good test statistics, bad test statistics

52 The Offenbach Oracle Throw the 20-sided die Score = 20: reject the null hypothesis Score ≠ 20: keep the null hypothesis This is (independent of the null hypothesis) a valid statistical test at a 5% type I error level! Toni, 29, Offenbach, mechanician and moral philosopher II Testing

53 The Offenbach Oracle But: The distribution of the test statistic under null- and alternative hypothesis is identical This test cannot discriminate between the two alternatives! Distribution under H 0 Distribution under H 1 95% of the Positives (as well as the Negatives) will be missed. II Testing

54 The p-value p = 0.08 Given a test statistic and ist actual value t in a sample, a p-Wert can be calculated: Each test value t maps to a p-value, the latter is the probability of observing a value of the test statistic which is at least as extreme as the actual value t [under the assumption of the null hypothesis]. t=4.2 II Testing

55 p = 0.42 t=0.7 II Testing The p-value Given a test statistic and ist actual value t in a sample, a p-Wert can be calculated: Each test value t maps to a p-value, the latter is the probability of observing a value of the test statistic which is at least as extreme as the actual value t [under the assumption of the null hypothesis].

56 Test decisions according to the p-value Decision boundary d significance level α Observed test statistic t p-value α = 0.05 p ≥ α Keep H 0 (no rejection) p < α Reject H 0 (assume the alternative hypothesis) t p = 0.02 d t p = 0.83 t more extreme than d p is smaller than α II Testing

57 One- and two-sided hypotheses ][ Acceptance region Rejection region One-sided alternative H 0 : The value of a quantity of interest in group A is not higher than in group B. H 1 :The value of a quantity of interest in group A is higher than in group B. II Testing

58 ][ Acceptance region Rejection region H 0 : The quantity of interest has the same value in group A and group B H 1 :The quantity of interest is different in group A and group B ][ Rejection region Generally, two-sided alternatives are more conservative: Deviations in both directions are detected. II Testing One- and two-sided hypotheses Two-sided alternative

59 Example “Testing”: Colon Carcinoma How about this fact? Variable: Vaccine Scale: binary Endpoint: 4-year survival Scale: binary 32*94 ≈ 30 (62-32)*77 ≈ 23 II Testing

60 Interesting questions: Das the vaccine yield any effect? Is this effect „significant“ ? 4-year survival JaNein Vaccine yes (n=32)30 (94%)2 (6%) no (n=30)23 (77%)7 (23%) II Testing Example “Testing”: Colon Carcinoma

61 Null hypothesis H 0 : Vaccination has not (either positive or negative) impact on the patients. The survival rates in the vaccine and non-vaccine group in the whole population are the same. Alternative hypothesis H 1 : For the whole population, the survival rates in the vaccine and non vaccine group are different. Choose the significance level α (usually: α = 1%; 0.1%; 5%) Interpretation of the significane level α : If there is no difference between the groups, one obtains a false positive result with a probability of α. II Testing Example “Testing”: Colon Carcinoma

62 Choice of test statistic: „Fisher‘s Exact Test“ Sir Ronald Aylmer Fisher, Theoretical Biology, Evolution Theory, Statistics II Testing Example “Testing”: Colon Carcinoma

63 Value of the test statistic t after the experiment has been carried out. This value can be converted into a p-value: p =  7.7% Since we have chosen a significane level α = 5%, and p > α, we cannot reject the null hypothesis, thus we keep it. Formulation of the result: At a 5% significance level (and using Fisher‘s Exact Test), no significant effect of vaccination on survival could be detected. Consequence: We are not (yet) sufficiently convinced of the utility of this therapy. But this does not mean that there is no difference at all! II Testing Example “Testing”: Colon Carcinoma

64 “No test based upon the theory of probability can by itself provide any valuable evidence of the truth or falsehood of a hypothesis.“ Neyman J, Pearson E (1933) Phil Trans R Soc A Egon Pearson ( ) Jerzy Neyman ( ) Non-significance ≠ equivalence Statistics can never prove a hypothesis, it can only provide evidence II Testing

65 End of Part I