Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents...

51
Basic Statistical Concepts José Sánchez 2020-01-24

Transcript of Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents...

Page 1: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Basic Statistical Concepts

José Sánchez 2020-01-24

Page 2: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Contents

• Bias and variability

• Confounding and interaction

• Descriptive and inferential statistics

• Hypothesis testing and p-values

Page 3: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Bias and variability

Bias: Systemtic deviation from the true value

−ˆE

Design, Conduct, Analysis, Evaluation

Lots of examples on page 49-51

Page 4: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Bias and variability

Larger study does not decrease bias

+→nˆ ; →n

Drug X - Placebo

-7 -4-10 mm Hg -7 -4-10

Drug X - Placebo

mm Hg mm Hg

Drug X - Placebo

-7 -4-10

n=40 n=200 N=2000

Distribution of sample means: = population mean

Population mean

bias

Page 5: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 6: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Bias and variability

Amount of difference between observations

True biological:

Temporal:

Measurement error:

Variation between subject due to biological factors (covariates) including the treatment.

Variation over time (and space)Often within subjects.

Related to instruments or observers

Design, Conduct, Analysis, Evaluation

Page 7: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 8: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Bias and variability

+= XY

Unexplained variation

Variation in observations

=Explained variation

+

Page 9: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Bias and variability

Y=μA+βx

Y=μB+βx

μA

μB

x=age

Model: ijijiij xY ++=

Page 10: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Confounding

The effect of two or more factors can not be separated

Example: Compare survival for surgery and drug

R

Life long treatment with drug

Surgery at time 0

•Surgery only if healthy enough•Patients in the surgery arm may take drug•Compliance in the drug arm may be poor

Looks ok but:

Survival

Time

Page 11: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 12: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 13: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 14: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Simpson’s paradox

Page 15: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Confounding

Can be sometimes be handled in the design

Example: Different effects in males and females

Imbalance between genders affects result

Stratify by gender

R

A

B

Gender

M

F

R

R

A

A

B

B

Balance on average Always balanced

Page 16: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

The outcome on one variable depends on the value of another variable.

Page 17: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Interaction

Example: Treatment by center interaction

Treatment difference in diastolic blood pressure

-25

-20

-15

-10

-5

0

5

10

15

0 5 10 15 20 25 30

Ordered center number

mm

Hg

Average treatment effect: -4.39 [-6.3, -2.4] mmHg

Treatment by center: p=0.01

What can be said about the treatment effect?

Page 18: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Descriptive and inferential statistics

The presentation of the results from a clinical trial can be split in three categories:

•Descriptive statistics•Inferential statistics•Explorative statistics

Page 19: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Descriptive and inferential statistics

Descriptive statistics aims to describe various aspects of the data obtained in the study.

•Listings.•Summary statistics (Mean, Standard Deviation…).•Graphics.

Page 20: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Descriptive and inferential statistics

Inferential statistics forms a basis for a conclusion regarding a prespecified objective addressing the underlying population.

Hypothesis Results

Confirmatory analysis:

Conclusion

Page 21: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Descriptive and inferential statistics

Explorative statistics aims to find interesting results thatcan be used to formulate new objectives/hypothesis for further investigation in future studies.

Results Hypothesis

Explorative analysis:

Page 22: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Hypothesis testing, p-values and confidence intervals

ObjectivesVariableDesign

Statistical ModelNull hypothesis

Estimatep-value

Confidence interval

ResultsInterpretation

Page 23: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 24: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Formalizing hypothesis testing

As null hypothesis, H0, we shall choose the hypothesis we want to reject

H0 : μX= μplacebo

As alternative hypothesis, H1, we shall choose the hypothesis we want to prove.

H1 : μX ≠ μplacebo

(two sided alternative hypothesis)

μ is a parameter that characterize the efficacy in the target population, for example the mean.

Page 25: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Hypothesis testing, p-values

Statistical model: Observations ( ) n

n RXX = ,1X

from a class of distribution functions

= :P

Hypothesis test: Set up a null hypothesis: H0: 0

and an alternative H1: 1

Reject H0 if ( ) 0|cSP Xn

c RS X

p-value:

Rejection region

The smallest significance level for which the null hypothesis can be rejected.

Significance level

Page 26: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

What can go wrong?

H0 true H0 false

Fail to reject No error (1-α) Type II error (β)

Reject Type I error (α) No error (1-β)

Page 27: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 28: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 29: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Structure of a hypothesis test

Given our H0 and H1

Assume that H0 is true

H0 : Treatment with substance X has no effect on blood pressure compared to placebo (μX= μplacebo)

1) We collect data from a scientific study. 2) Calculate the likelihood/probability/chance of data if H0 was true.

P-value:Probability to get at least as extreme as what we observed given H0

Page 30: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

How to interpret the p-value?

P-value small:Correct: our data is unlikely given the H0. We don’t believe in unlikely things so something is wrong.Reject H0.

P-value large:We can´t rule out that H0 is true; we can´t reject H0

A statistical test can never prove the null hypothesis!!!!

Page 31: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 32: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 33: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 34: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

However….

• A high p-value is not evidence that H0 is true

• P-value is not the probability of the null hypothesis

• P-value says nothing about the size of the effect

• A statistical significant difference does not need to be clinically relevant!

• Easy to misinterpret and mix things up (p-value, size of test, significance level, etc)

Page 35: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Confidence intervals

A confidence set is a random subset covering the true parameter value with probability at least .

( ) XC

−1

Let ( )rejectednot : if 0

rejected : if 1,

*

0

*

0*

=

==

H

HX (critical function)

Confidence set: ( ) ( ) 0,: == XXC

The set of parameter values correponding to hypotheses that can not be rejected.

Page 36: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Example:

•We study the effect of treatment X on change in DBP from baseline to 8 weeks

•The true treatment effect is: d = μX–μplacebo

•The estimated treatment effect is:

–How reliable is this estimation?

Page 37: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 38: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

General principle

• There is a True fixed value • We estimate this value using data from a clinical

trial• Estimate deviations from the true value(by an unknown amount)

If repeating the study a number of times, the different estimates would be centered around the true value

A 95% confidence interval is an interval estimated so that if the study is repeated a number of times, the interval will cover the true value in 95% of these

Page 39: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 40: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 41: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 42: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 43: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 44: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 45: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Analogy with tests

•For most statistical tests there is a corresponding confidence interval

•If a 95% confidence interval does not cover ‘the zero’, the corresponding test is to give a p-value < 0.05.

•If for example your p-value is based on the median and the confidence interval is based on the mean you can get conflicting results = trouble

Page 46: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Example

yij = μ + τi + β (xij - x··) + εij

Variable: The change from baseline to end of study in sitting DBP(sitting SBP) will be described with an ANCOVA model,

with treatment as a factor and baseline blood pressure as a covariate

Null hypoteses (subsets of ):H01: τ1 = τ2 (DBP)H02: τ1 = τ2 (SBP)H03: τ2 = τ3 (DBP)H04: τ2 = τ3 (SBP)

Objective: To compare sitting diastolic blood pressure (DBP) lowering effect of hypersartan 16 mg, 8 mg and 4 mg

Model:treatment effecti = 1,2,3 {16 mg, 8 mg, 4 mg}

Parameter space: 4R

4R

( )0321 =++

Page 47: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Example contined

Hypothesis Variable LS Mean CI (95%) p-value

1: 16 mg vs 8 mg Sitting DBP -3.7 mmHg [-4.6, -2.8] <0.001

2: 16 mg vs 8 mg Sitting SBP -7.6 mmHg [-9.2, -6.1] <0.001

3: 8 mg vs 4 mg Sitting DBP -0.9 mmHg [-1.8, 0.0] 0.055

4 : 8 mg vs 4 mg Sitting SBP -2.1 mmHg [-3.6, -0.6] 0.005

This is a t-test where the test statistic follows a t-distribution

Rejection region: ( ) cT XX :

001.0P-value: The null hypothesis can pre rejected at

( )XT0-c c

21 −0-4.6 -2.8

Page 48: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential
Page 49: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Statistical and clinical significance

Statistical significance:

Clinical significance:

Health ecominical relevance:

Is there any difference between the evaluated treatments?

Does this difference have any meaning for the patients?

Is there any economical benefit for the society in using the new treatment?

Page 50: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Statistical and clinical significance

A study comparing gastroprazole 40 mg and mygloprazole 30 mg with respect to healing of erosived eosophagitis after 8 weeks treatment.

Drug Healing rate

gastroprazole 40 mg 87.6%

mygloprazole 30 mg 84.2%

Cochran Mantel Haenszel p-value = 0.0007

Statistically significant!

Health economically relevant?

Clinically significant?

Page 51: Basic Statistical Concepts · Basic Statistical Concepts José Sánchez 2020-01-24. Contents •Bias and variability •Confounding and interaction •Descriptive and inferential

Chapter 2 Reading instructions

• 2.1 Introduction: Not very important

• 2.2 Uncertainty and probability: Read

• 2.3 Bias and variability: Read

• 2.4 Confounding and interaction: Read

• 2.5 Descriptive and inferential statistics: Repetition

• 2.6 Hypothesis testing and p-values: Repetition*

• 2.7 Clinical significance and clinical equivalence: Read

• 2.8 Reproducibility and generalizability: Read

*) Read extra material