1 / 75

P rinciples of statistics a nd scientific interpretation of statistical tests Fabio Fusi

P rinciples of statistics a nd scientific interpretation of statistical tests Fabio Fusi Dipartimento di Scienze Biomediche. Why do we need statistical calculations Goal: to make the strongest possible conclusions from limited amount of data Two problems:

halona
Télécharger la présentation

P rinciples of statistics a nd scientific interpretation of statistical tests Fabio Fusi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Principles of statistics and scientific interpretation of statistical tests Fabio Fusi Dipartimento di Scienze Biomediche

  2. Why do we need statistical calculations Goal: to make the strongest possible conclusions from limited amount of data Two problems: 1. Important differences are often obscured by biological variability and/or experimental imprecision: real differences or random variation? 2. Overgeneralization

  3. Many kind of data can be analysed without statistical analysis Differences that are large compared with the scatter. However, in many areas of biology it is difficult to distinguish the signal from the noise created by biological variability (in spite of inbred animals or cloned cells) and imprecise measurements

  4. Statistical calculations extrapolate from sample to population Make general conclusions from limited amounts of data. Some examples: Quality control Political polls Clinical studies (the sample of patients studied is rarely a random samples of the larger population) Laboratory experiments (extending the terms sample and population to laboratory experiments is a bit awkward - from the sample data you want to make inferences about the ideal situation)

  5. What statistical calculations CAN do 1. Statistical estimation (mean-->scatter and size-->confidence interval) 2. Statistical hypothesis testing (decide whether an observed difference is likely to be caused by chance) Popolazione A no difference Popolazione B What is the probability of Randomly selected Randomly selected sample A sample B with a difference as large or larger than actually observed? --> P value 3. Statistical modeling (how well experimental data fit a mathematical model)

  6. What statistical calculations CANNOT do In theory: 1. Define a population 2. Randomly select a sample of subjects to study 3. Randomly divide the subjects to receive treatment A or B 4. Measure a single variable in each subject 5. Use statistics to make inferences about the distribution of the variable in the population and about the effect of the treatment Common problems (for example design a study to test a new drug against HIV): 1. The population you really care about is more diverse than the population from which your data were sampled 2. You collect data from a "covenience sample" rather than a random sample 3. The measured variable is a proxy for another variable you really care about 4. Your measurements may be made or recorded incorrectly 5. You need to combine different kinds of measurements to reach an overall conclusion.

  7. Confidence intervals and P values Statistical analysis of data leads to two kinds of results: 1. Confidence intervals (state a result with margin of error) 2. P values (matches two or more samples) The two give complementary information.

  8. Confidence intervals When we know the proportion in one sample, the only way to be sure about the proportion in the population is to calculate a range of values that bracket the true population proportion. Scientists usually accept a 5% chance that the range will not include the true population value. 95% confidence interval (CI) The margin of error depend on the sample size: Proportion in a sample of 100 subject = 0.33 CI = 0.24-0.42 (confidence limits) Proportion in a sample of 14 subject = 0.21 CI = 0.05-0.51 (confidence limits) You can be 95% sure that the 95% CI includes the true population value.

  9. The interpretation of the CI depends on the following assumptions: 1. Random (or representative) sample (for example Roosvelt-Landon 1936) 2. Independent observation (patients double counted or coming from the same family) 3. Accurate assessment (data recorded incorrectly) 4. Assessing an event you really care about (only severe but not all possible drug reactions)

  10. Measurements vs fraction or proportion Working with measurements is more difficult than proportions, because you must deal with variability within samples as well as differences between groups. Source of variability 1. Imprecision or experimental error 2. Biological variability 3. Blunders

  11. Presenting data 1. To display the scatter of measurements: histograms 2. To describe the centre of the distribution: calculate the mean/average: Urinary concentrations of lead in 15 (n=15) children (mol/24h): 0.6, 2.6, 0.1, 1.1, 0.4, 2.0, 0.8, 1.3, 1.2, 1.5, 3.2, 1.7, 1.9, 1.9, 2.2. y mean = -------------- N In this case (0.6+2.6+ …… +1.9+2.2) / 15 = 22.5 / 15 = 1.5 or the median N + 1 N N + 2 median = -------- if odd or = ------- < median < ------- 2 2 2

  12. 3. To describe the spread/scatter of the data: report the lowest and highest values (i.e. the range), the 25th and 75th percentiles (interquartile range), calculate the variance 2:  (Yi - µ)2 2 = ------------ N - 1 or the standard deviation (the best possible estimate of the SD of the entire population, as determined from one particular sample): SD = 2 (more than half of the observations in a population usually lie within 1 SD on either side of the mean) or the standard error: SD s.e. = -------- N Thus, when N is small, the standard error will be relatively large. The effect of N rapidly diminishes in large samples, which are that much more likely to be representative of the population as a whole.

  13. The Gaussian distribution A symmetrical bell-shaped distribution. Variables approximate: 1. a Gaussian distribution when the variation is caused by many independent factors 2. a bimodal or skewed distribution, when the variation is largely due to one factor. About two thirds of a Gaussian population are within 1 SD of the mean. About 95% of the values in a Gaussian distribution lie within 2 SDs of the mean.

  14. Uso della statistica per confrontare due gruppi di dati • Calcolo del valore di P • Quanto siamo sicuri che esista una differenza tra le due popolazioni? • La differenza è dovuta ad un puro caso verificatosi durante il campionamento o alla reale differenza tra le due popolazioni? • Il calcolo statistico ci dice quanto raramente può accadere questo puro caso, ma non se è realmente avvenuto.

  15. Un esempio: la P sanguigna negli studenti di CTF I anno: 120, 80, 90, 110, 95 mmHg III anno: 105, 130, 145, 125, 115 mmHg P = 0.034

  16. Implicazioni biologiche e cliniche dei dati (1) • Esiste una differenza di 25 mmHg nella pressione sanguigna sistolica: se tale differenza fosse consistente potrebbe avere importanti implicazioni cliniche. • Al contrario, una differenza di 25 unità in alcune altre variabili potrebbe essere insignificante. • Il calcolo statistico non può indicare se una differenza è clinicamente o scientificamente importante. • Gli studenti del I anno e del III anno hanno una identica distribuzione della pressione sanguigna e la differenza osservata è soltanto frutto di una combinazione. • La pressione sanguigna degli studenti del III anno è realmente più alta di quella degli studenti del I anno.

  17. Implicazioni biologiche e cliniche dei dati (2) Quale è la probabilità che la differenza osservata sia frutto di una semplice combinazione? Se si assume che gli studenti del I anno e del III anno hanno una identica distribuzione della pressione sanguigna, quale è la probabilità che la differenza tra le medie di soggetti selezionati sia frutto di una pura casualità e risulti ugualmente ampia o più ampia di quella realmente osservata? Il valore P

  18. Come si calcola il valore P • Supporre che gli individui (campioni) a cui è stata misurata la pressione sono stati selezionati a caso/sono rappresentativi da/di un gruppo più ampio (popolazione). • Supporre che il disegno sperimentale è esente da errori e imperfezioni. • Ipotizzare che la distribuzione dei dati nelle due popolazioni è la stessa • (ipotesi nulla). <---> ipotesi sperimentale o alternativa • Presumendo che l’ipotesi nulla è vera, calcolare la probabilità di osservare vari possibili risultati. Esistono vari metodi a seconda della natura dei dati e delle ipotesi fatte. • Determinare la parte di quei possibili risultati nei quali la differenza tra le medie è ugualmente ampia o più ampia di quella realmente osservata. • La risposta è fornita dal valore di P

  19. Quattro aspetti difficili pensando al valore di P L’ipotesi nulla <---> l’ipotesi dello sperimentatore I ricercatori trovano strano calcolare la distribuzione teorica della probabilità di risultati pertinenti esperimenti che non verranno mai eseguiti. L’origine della distribuzione teorica della probabilità esula dalle conoscenze matematiche della maggioranza dei ricercatori. La logica va in una direzione che sembra intuitivamente tornare indietro: si osserva un campione per trarre delle conclusioni sulla popolazione, mentre il calcolo del valore di P si basa su di un assunto relativo alla popolazione (ipotesi nulla) per determinare la probabilità di selezionare a caso campioni caratterizzati da differenze ampie come quelle da noi osservate.

  20. Interpretazione del valore di P (1) P = 0.034 Se l’ipotesi nulla fosse vera, allora il 3,4% di tutti i possibili esperimenti con un analogo numero di osservazioni risulterebbe in una differenza tra le medie della pressione sanguigna ugualmente ampia o più ampia di quella realmente osservata. In altre parole, se l’ipotesi nulla fosse vera, esistono solo 3,4% possibilità di selezionare a caso campioni la cui differenza tra le medie della pressione sanguigna sia ugualmente ampia o più ampia di quella realmente osservata. Il calcolo statistico fornisce il valore di P. A noi spetta l’interpretazione.

  21. Interpretazione del valore di P (2) Le due popolazioni hanno pressioni medie identiche (la differenza osservata è la conseguenza di un puro caso o di una combinazione) Le due popolazioni hanno pressioni medie differenti L’analisi statistica determina la probabilità che questa casualità si verifichi (nel nostro esempio la probabilità è del 3,4% se realmente non c’è differenza tra le due popolazioni)

  22. Interpretazione ERRATA del valore di P (1) P = 0.034 significa che, anche se le due popolazioni hanno medie identiche, il 3,4% degli esperimenti condotti analogamente al nostro risulterà in una differenza ampia almeno quanto quella da noi misurata. La tentazione è quella di dire: se esiste solo una probabilità del 3,4% che la differenza da me osservata sia la conseguenza di una pura casualità, allora ci deve essere il 96,6% di probabilità che sia causato da una reale differenza.

  23. Interpretazione ERRATA del valore di P (2) Si può solamente dire che, se l’ipotesi nulla fosse vera, allora il 96,6% degli esperimenti fornirebbe una differenza < di quella osservata mentre il 3,4% degli esperimenti fornirebbe una differenza > di quella osservata. Il calcolo del valore di P si basa sull’assunto che l’ipotesi nulla sia corretta. Il valore di P non ci dice se questo assunto è corretto. La domanda a cui il ricercatore deve rispondere è se il risultato è talmente improbabile che l’ipotesi nulla debba essere scartata.

  24. Valori di P ad una coda o due code Il valore di P a due code rappresenta la probabilità (basandosi sull’assunto dell’ipotesi nulla) che il campionamento casuale fornisca una differenza  di quella osservata e che entrambi i gruppi abbiano la media più alta. Il valore di P ad una coda, al contrario, rappresenta la probabilità (basandosi sull’assunto dell’ipotesi nulla) che il campionamento casuale fornisca una differenza  di quella osservata e che il gruppo indicato dall’ipotesi sperimentale abbia la media più alta. Esempio: pressione sanguigna Il test ad una coda è appropriato quando dati precedentemente ottenuti, limitazioni fisiche o buon senso ci dicono che la differenza, se mai ce ne sarà una, può andare soltanto in una direzione.

  25. Valori di P ad una coda o due code (2) Esempio : saggiare se un nuovo antibiotico danneggia la funzione renale (il danno viene misurato come aumento dei livelli di creatinina nel siero). Ci possono essere due sole possibilità? Il valore di P a due code saggia l’ipotesi nulla che l’antibiotico non alteri i livelli di creatinina Il valore di P ad una coda saggia l’ipotesi nulla che l’antibiotico non aumenti i livelli di creatinina Non si può escludere una terza possibilità

  26. Scelta del numero di code • I valori di P a due code sono usati più frequentemente di quelli ad una sola coda: • la relazione tra i valori di P e i CI è più chiara con le due code • i valori di P a due code sono più larghi e quindi più conservativi (molti esperimenti non ottemperano completamente a tutte le ipotesi su cui si basano i calcoli statistici) • alcuni test confrontano tre o più gruppi tra di loro (il valore di P ha più di due code) • si evita la situazione spiacevole di osservare una differenza ampia tra due gruppi che però ha direzione opposta rispetto all’ipotesi sperimentale

  27. Conclusioni La maggior parte dei tests statistici fornisce un valore di P. E’ essenziale, pertanto, comprendere che cosa, il valore di P, rappresenta e, soprattutto, che cosa NON rappresenta.

  28. “Il concetto di significatività statistica-Testare l’ipotesi” • Il concetto “statisticamente significativo” • Quando si interpretano dei dati (esperimento pilota su nuovi farmaci, sperimentazione clinica fase III, nuove tecniche chirurgiche) è necessario giungere ad una conclusione. • Testare l’ipotesi: • ipotizzare che i campioni sono stati selezionati casualmente dalla popolazione • accettare l’ipotesi nulla che la distribuzione dei valori nelle due popolazioni è la stessa • definire un valore soglia ( = 0.05: livello di significatività) oltre il quale il valore diventa significativo • selezionare un’appropriata analisi statistica e calcolare il valore di P • se P <  la differenza è statisticamente significativa e l’ipotesi nulla è respinta • se P >  la differenza non è statisticamente significativa e l’ipotesi nulla non è respinta

  29. Testare l’ipotesi Scientifica (esperimenti, metodologie, controlli, ecc.) Statistica (calcolo del valore di P) Il valore di P rappresenta un modo conciso per riassumere l’opinione di un ricercatore su una serie di dati sperimentali Esempio del magazzino della fabbrica di birra

  30. Vantaggi e svantaggi nell’uso del concetto “statisticamente significativo” • Vantaggi: • in alcuni casi è necessario giungere ad una conclusione a partire da un solo esperimento: decidersi in un modo se i risultati sono significativi, nell’altro se non lo sono • con alcune analisi statistiche è difficile se non impossibile ottenere un esatto valore di P ma è sempre possibile determinare se P è > o < di  • concludere che “i risultati sono statisticamente significativi” è decisamente meno ambiguo che affermare “il campionamento casuale determinerebbe una differenza ugualmente ampia o più ampia nel 3.4% degli esperimenti se l’ipotesi nulla fosse vera” • Svantaggi: • molti ricercatori smettono di pensare ai dati

  31. Un analogia: “Innocente fino a prova contraria” Esiste una analogia tra la prassi che una giuria di un tribunale deve seguire per dichiarare colpevole un imputato e quella che un ricercatore segue per determinare una significatività statistica. La giuria non può mai emettere un verdetto di innocenza, il ricercatore non può mai affermare che l’ipotesi nulla è vera.

  32. Errori di tipo I e II Tipo I: affermare che una differenza è statisticamente significativa e respingere l’ipotesi nulla quando invece è valida. Tipo II: affermare che una differenza non è statisticamente significativa e non respingere l’ipotesi nulla quando invece è falsa.

  33. Scelta del valore appropriato di  Per tradizione  è posto uguale a 0.05, anche se questo dovrebbe essere indicato dal contesto dell’esperimento piuttosto che dalla tradizione. Se  fosse ridotto a valori <0.05 Se  fosse aumentato a valori >0.05 Errore di Tipo I Errore di Tipo II Errore di Tipo I Errore di Tipo II

  34. Valutare il costo degli errori di tipo I e II (1) Modificare il valore di  a seconda dei casi. Esempio I: screening di un nuovo farmaco Se gli esperimenti forniscono risultati significativi --> l’indagine proseguirà Se gli esperimenti forniscono risultati non significativi --> il nuovo farmaco verrà accantonato Costo di un errore di Tipo I = modesto approfondimento di indagine Costo di un errore di Tipo II = abbandono di una sostanza efficace  = 0.10 o 0.20

  35. Valutare il costo degli errori di tipo I e II (2) Esempio II: nuovo farmaco antipertensivo in fase III (esiste già una buona terapia per il trattamento dell’ipertensione) Se gli esperimenti forniscono risultati significativi --> il nuovo farmaco verrà immesso in commercio Se gli esperimenti forniscono risultati non significativi --> il nuovo farmaco verrà accantonato Costo di un errore di Tipo I = i pazienti verranno trattati con un farmaco privo di efficacia e privati al tempo stesso di una valida terapia già consolidata Costo di un errore di Tipo II = abbandono di una sostanza utile per il trattamento di una patologia per cui esiste già una terapia efficace  = 0.01

  36. Valutare il costo degli errori di tipo I e II (3) Esempio III: nuovo farmaco in fase III (non esiste ancora una buona terapia per questa patologia) Se gli esperimenti forniscono risultati significativi --> il nuovo farmaco verrà immesso in commercio Se gli esperimenti forniscono risultati non significativi --> il nuovo farmaco verrà accantonato Costo di un errore di Tipo I = i pazienti verranno trattati con un farmaco privo di efficacia anziché con nulla Costo di un errore di Tipo II = abbandono di una sostanza efficace per il trattamento di una patologia per cui non esiste ancora una terapia  = 0.10

  37. Relazione tra  e valore di P • Il valore di P e  sono strettamente correlati. • Il valore di P viene calcolato dai dati raccolti. • Viene prefissato α sulla base delle conseguenze di errori di Tipo I o II. •  rappresenta il valore soglia per P al di sotto del quale la differenza osservata è definita “statisticamente significativa”.

  38. Significatività statistica vs. importanza scientifica • Una differenza è statisticamente significativa quando il valore di • P < . • Esistono 3 possibilità: • l’ipotesi nulla è vera e la differenza da noi osservata è puramente casuale. Il valore di P ci dice quanto rara sarà questa casualità. • l’ipotesi nulla è falsa (le due popolazioni sono effettivamente differenti) e la differenza da noi osservata è scientificamente o clinicamente importante. • l’ipotesi nulla è falsa (le due popolazioni sono effettivamente differenti) ma la differenza da noi osservata è così piccola da non essere scientificamente o clinicamente importante. • Piccole differenze ottenute con campioni molto numerosi devono sempre essere interpretate.

  39. “Come si interpretano i valori di P: i) significativi e ii) non significativi” THE TERM SIGNIFICANT The term statistically significant has a simple meaning: the P value is less than a preset threshold value . The statistical use of the word significant has a meaning entirely distinct from its usual meaning. Just because a difference is statistically significant does not mean that it is important or interesting. A statistically significant result may not be scientifically significant or clinically significant. And a difference that is not significant (in the first experiment) may turn out to be very important.

  40. EXTREMELY SIGNIFICANT RESULTS Intuitively, you'd think that P = 0.004 is more significant than P = 0.04. This is not correct. Once you have set a value for , a result either is statistically significant or is not statistically significant. Very significant or extremely significant results when the P value is tiny. When showing P values on graphs, investigators commonly use a "Michelin Guide" scale. *: P < 0.05 (significant) **: P < 0.01 (highly significant) ***: P < 0.001 (extremely significant).

  41. BORDERLINE P VALUES If you follow the strict paradigm of statistical hypothesis testing and set  to its conventional value of 0.05, then a P value of 0.049 denotes a statistically significant difference and a P value of 0.051 denotes a not significant difference (the whole point of using the term statistically significant is to reach a crisp conclusion from every experiment without exception). When a P value is just slightly greater than , some scientists refer to the result as marginally significant or almost significant. One way to deal with borderline P values would be to choose between three decisions rather than two. Rather than decide whether a difference is significant or not significant, add a middle category of inconclusive. This approach is not commonly used.

  42. THE TERM NOT SIGNIFICANT If the P value is greater than a preset value of , the difference is said to be not significant. This means that the data are not strong enough to persuade you to reject the null hypothesis. A proof that the null hypothesis is true? A high P value does not prove the null hypothesis, since concluding that a difference is not statistically significant when the null hypothesis is, in fact, false is called a Type II error. When you read that a result is not significant, don't stop thinking. There are two approaches you can use to evaluate the study. First, look at the confidence interval (CI). Second, ask about the power of the study to find a significant difference if it were there.

  43. “Come si sceglie un test statistico” • REVIEW OF AVAILABLE STATISTICAL TESTS • To select the right test, ask yourself two questions: • What kind of data have you collected? • What is your goal? • Then refer to Table 37.1.

  44. REVIEW OF NONPARAMETRIC TESTS Choosing the right test to compare measurements is a bit tricky, as you must choose between two families of tests: parametric and nonparametric. Many -statistical test are based upon the assumption that the data are sampled from a Gaussian distribution. These tests are referred to as parametric tests (i.e. the t test and analysis of variance). Tests that do not make assumptions about the population distribution are referred to as nonparametric tests. All commonly used nonparametric tests rank the outcome variable from low to high and then analyse the ranks.

  45. CHOOSING BETWEEN PARAMETRIC AND NONPARAMETRIC TESTS: THE EASY CASES (1) Choosing between parametric and nonparametric tests is sometimes easy. You should definitely choose a parametric test if you are sure that your data are sampled from a population that follows a Gaussian distribution (at least approximately). You should definitely select a nonparametric test in three situations: • The outcome is a rank or a score and the population is clearly not Gaussian. Examples include class ranking of students, the visual analogue score for pain (measured on a continuous scale where 0 is no pain and 10 is unbearable pain), and the star scale commonly used by movie and restaurant critics (* is OK, ***** is fantastic).

  46. CHOOSING BETWEEN PARAMETRIC AND NONPARAMETRIC TESTS: THE EASY CASES (2) • Some values are "off the scale," that is, too high or too low to measure. Even if the population is Gaussian, it is impossible to analyse such data with a parametric test since you don't know all of the values. Assign values too low to measure an arbitrary very low value and assign values too high to measure an arbitrary very high value. Then perform a nonparametric test. Since the nonparametric test only knows about the relative ranks of the values, it won't matter that you didn't know all the values exactly. • The data are measurements, and you are sure that the population is not distributed in a Gaussian manner. If the data are not sampled from a Gaussian distribution, consider whether you can transformed the values to make the distribution become Gaussian (take the logarithm or reciprocal of all values for biological or chemical reasons as well as statistical ones.

  47. CHOOSING BETWEEN PARAMETRIC AND NONPARAMETRIC TESTS: THE HARD CASES • Decide whether a sample comes from a Gaussian population. • • With many data points (over a hundred or so), you can look at the distribution of data and it will be fairly obvious whether the distribution is approximately bell shaped. A formal statistical test can be used. • With few data points, it is difficult to tell whether the data are Gaussian by inspection, and the formal test has little power.• You should look at previous data as well. Remember, what matters is the distribution of the overall population, not the distribution of your sample. • Consider the source of scatter. When the scatter comes from the sum of numerous sources, you expect to find a roughly Gaussian distribution.When in doubt, some people choose a parametric test (because they aren't sure the Gaussian assumption is violated), and others choose a nonparametric test (because they aren't sure the Gaussian assumption is met).

  48. CHOOSING BETWEEN PARAMETRIC AND NONPARAMETRIC TESTS: DOES IT MATTER? (1) The answer depends on sample size. • Large sample. With data from a non-Gaussian population, parametric tests work well. It is impossible to say how large is large enough. You are probably safe when there are at least two dozen data points in each group. • Large sample. With data from a Gaussian population,nonparametric tests work well. The P values tend to be a bit too large, but the discrepancy is small. Nonparametric tests are only slightly less powerful than parametric tests with large samples. • Small samples. With data from non-Gaussian populations you can't rely on parametric test since P value may be inaccurate. • Small samples. With data from a Gaussian population nonparametric tests lack statistical power and P values tend to be too high.

More Related