64
Rigorous Science - Based on a probability value? The linkage between Popperian science and statistical analysis

The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

  • Upload
    vunhi

  • View
    221

  • Download
    5

Embed Size (px)

Citation preview

Page 1: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Rigorous Science - Based on a probability value?

The linkage between Popperian science and

statistical analysis

Page 2: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Philosophy of science: the scientific Method

- from a Popperian perspective

Philosophy

Science

Design

How we understand the world

How we expand that understanding

How we implement science

Arguments over how we understand and expand our understanding

are the basis of debates over how science has been, is and should be

done

Page 3: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Philosophy of science: the scientific Method

- from a Popperian perspective

Terms:

1. Science - A method for understanding rules of assembly or

organization

a) Problem: How do we, (should we) make progress in science

2. Theory - a set of ideas formulated to explain something

3. Hypothesis - supposition or conjecture (prediction) put forward to

account for certain facts, used as a basis for further investigations

4. Induction or inductive reasoning - reasoning that general

(universal) laws exist because particular cases that seem to be

examples of those laws also exist

5. Deduction or deductive reasoning - reasoning that something must

be true because it is a particular case of a general (universal) law

Particular General

Induction

Deduction

Page 4: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective

Extreme example

1. Induction

“Every swan I have seen is white, therefore all

swans are white”

2. Deduction

“All swans are white, the next one I see will be

white”

Compare these statements:

1. Which can be put into the form of a testable hypothesis?

(eg. prediction, if - then statement)

2. Which is closer to how we operate in the world?

3. Which type of reasoning is most repeatable?

Is there a difference between ordinary understanding and

scientific understanding (should there be?)

Page 5: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

INSIGHT

Existing Theory

General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

(and predictions) Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted)

H rejected O

A

H rejected

H supported (accepted) O

A

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

1. Conception - Inductive reasoning

a. Observations

b. Theory

c. Problem

d. Regulation

e. Belief

2. Leads to Insight and a General

Hypothesis

3. Assessment is done by

a. Formulating Specific

hypotheses

b. Comparison with new

observations

4. Which leads to:

a. Falsification - and rejection

of insight, and specific and

general hypotheses, or

b. Confirmation - and

retesting of alternative

hypotheses

Page 6: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

INSIGHT

Existing Theory General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

The next swan I see will be white)

Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted)

H rejected O

A

H rejected

H supported (accepted) O

A

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

1. Is there any provision for accepting

the insight or working hypothesis?

2. Propositions not subject to rejection

by contrary observations are not

“scientific”

3. Confirmation does not end hypothesis

testing - new hypotheses should

always be put forth for a particular

observation, theory, belief…

4. In practice but rarely reported,

alternatives are tested until only one

(or a few) are left (not rejected).

Then we say things like: suggest,

indicates, is evidence for

5. Why is there no provision for

accepting theory or working

hypotheses?

Questions and Notes

All swans are white

a) Because it is easy to find confirmatory observations for almost any hypothesis, but one negative

result refutes it absolutely (this assumes test was adequate - the quality of falsification is

important)

Page 7: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

Considerations - problems with the Popperian

hypothetico -deductive approach)

INSIGHT

Existing Theory General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

The next swan I see will be white)

Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted) H rejected O

A

H rejected H supported (accepted) O

A

All swans are white

1) This type of normal science may rarely lead to revolutions in

Science (Kuhn)

A) Falsification science leads to paradigms - essentially a

way of doing and understanding science that has followers

B) Paradigms have momentum - mainly driven by tradition,

infrastructure and psychology

C) Evidence against accepted theory is considered to be

exceptions (that prove the rule)

D) Only major crises lead to scientific revolutions

1) paradigms collapse from weight of exceptions -

normal science - crisis - revolution - normal science

Page 8: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

1. The paradigm: The earth must be the center of the universe – 350 BC

2. Exceptions are explained- Ptolemaic universe

a) All motion in the heavens is uniform circular motion.

b) The objects in the heavens are made from perfect material, and cannot

change their intrinsic properties (e.g., their brightness).

c) The Earth is at the center of the Universe.

3. Paradigm nears scientific collapse

4. Religion Intervenes – middle ages

1 2 3

Page 9: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Copernican Revolution

1543 AD

Page 10: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

Considerations - problems with the Popperian

hypothetico -deductive approach)

1) This type of normal science may rarely lead to revolutions in

Science (Kuhn)

A) Falsification science leads to paradigms - essentially a

way of doing and understanding science that has followers

B) Paradigms have momentum - mainly driven by tradition,

infrastructure and psychology

C) Evidence against accepted theory is considered to be

exceptions (that prove the rule)

D) Only major crises lead to scientific revolutions

1) paradigms collapse from weight of exceptions -

normal science - crisis - revolution - normal science

Copernican Universe

Aristotle - Ptolemian universe

Page 11: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

INSIGHT

Existing Theory General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

The next swan I see will be white)

Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted) H rejected O

A

H rejected H supported (accepted) O

A

All swans are white

1) Choice of Method for doing science. Platt (1964) reviewed

scientific discoveries and concluded that the most efficient way

of doing science consisted of a method of formal hypothesis

testing he called Strong Inference.

A) Apply the following steps to every problem in Science -

formally, explicitly and regularly:

1) Devise alternative hypotheses

2) Devise critical experiments with alternative possible

outcomes, each of which will exclude one or more of

the hypotheses (rejection)

3) Carry out procedure so as to get a clean result

1’) Recycle the procedure, making subhypotheses or

sequential ones to define possibilities that remain

Considerations - problems with the Popperian

hypothetico -deductive approach)

Page 12: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

INSIGHT

Existing Theory General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

The next swan I see will be white)

Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted) H rejected O

A

H rejected H supported (accepted) O

A

All swans are white

2) Philosophical opposition - (e.g. Roughgarden 1983)

A) Establishment of empirical fact is by building a

convincing case for that fact.

B) We don’t use formal rules in everyday life, instead we

use native abilities and common sense in building and

evaluating claims of fact

C) Even if we say we are using the hypothetico - deductive

approach, we are not, instead we use intuition and make it

appear to be deduction

Considerations - problems with the Popperian

hypothetico -deductive approach)

Page 13: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The Scientific Method - from a Popperian perspective Hypothetico - deductive method

INSIGHT

Existing Theory General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

The next swan I see will be white)

Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted) H rejected O

A

H rejected H supported (accepted) O

A

All swans are white

Considerations - problems with the Popperian

hypothetico -deductive approach)

3) Practical opposition - (e.g. Quinn and Dunham 1983)

A) In practice ecology and evolution differ from Popperian

science

1) they are largely inductive

2) although falsification works well in physical and

some experimental areas of biology - it is difficult to

apply in complex systems of multiple causality - e.g.

Ecology and Evolution

3) Hypothetico - deductive reasoning works well if

potential cause is shown not to work at all

(falsified) but this rarely occurs in Ecology or

Evolution - usually effects are of degree.

This may be a potent criticism and

it leads to the use of inferential

statistics

Page 14: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

A) Philosophical underpinnings of Popperian Method is based on absolute differences

1) E.g. All swans are white, therefore the next swan I see will be white - If the next

swan is not white then the hypothesis is refuted absolutely.

B) Instead, most results are based on comparisons of measured variables

1) not really true vs. false but degree to which an effect exists

Example - Specific hypothesis – number of Oak seedlings is higher in areas

outside impact sites than inside impact sites

Absolute vs. measured differences

Observation 1:

Number inside Number outside

0 10

0 15

0 18

0 12

0 13

Mean 0 13

Observation 2:

Number inside Number outside

3 10

5 7

2 9

8 12

7 8

Mean 5 9.2

What counts as a difference?

Are these different?

Page 15: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

A brief digression to re-sampling theory

Number inside Number outside

3 10

5 7

2 9

8 12

7 8

Mean 5 9.2

Traditional evaluation would probably involve a t test:

another approach is re-sampling.

Page 16: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Treatment Number

Inside 3

Inside 5

Inside 2

Inside 8

Inside 7

Outside 10

Outside 7

Outside 9

Outside 12

Outside 8

1) Assume both treatments come from the same

distribution, that is, if sampled sufficiently we would

find no difference between the values inside vs.

outside.

a. Usually we compare the means.

2) Resample groups of 5 observations (why 5?), with

replacement, but irrespective of treatment

Resampling

Page 17: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Treatment Number

Inside 3

Inside 5

Inside 2

Inside 8

Inside 7

Outside 10

Outside 7

Outside 9

Outside 12

Outside 8

1) Assume both treatments come from the same

distribution

2) Resample groups of 5 observations, with

replacement, but irrespective of treatment

Resampling

Page 18: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Treatment Number

Inside 3

Inside 5

Inside 2

Inside 8

Inside 7

Outside 10

Outside 7

Outside 9

Outside 12

Outside 8

1) Assume both treatments come from the same

distribution

2) Resample groups of 5 observations, with

replacement, but irrespective of treatment

3) Calculate means for each group of 5

Resampling

7.6

Page 19: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Treatment Number

Inside 3

Inside 5

Inside 2

Inside 8

Inside 7

Outside 10

Outside 7

Outside 9

Outside 12

Outside 8

1) Assume both treatments come from the same

distribution

2) Resample groups of 5 observations, with

replacement, but irrespective of treatment

3) Calculate mean for each group of 5

4) Repeat many times

5) Calculate differences between pairs of means

(remember the null hypothesis is that there is no

effect of treatment). This generates a distribution of

differences.

Resampling

Page 20: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Mean 1 Mean 2 Difference

8 7.8 0.2

5.6 8.2 -2.6

6 9 -3

8 5 3

6 6 0

7 8 -1

6 6.8 -0.8

8 7.2 0.8

8 6.6 1.4

7 8.4 -1.4

6 5.4 0.6

7 6.4 0.6

6.4 6.8 -0.4

5 3.4 1.6

6.8 4.8 2

6.4 7.2 -0.8

7.2 8 -0.8

6.4 4.6 1.8

8.4 6 2.4

7.4 6.6 0.8

5.6 8.4 -2.8

8.2 6.2 2

7.8 8.4 -0.6

8.6 6.6 2

6 10.2 -4.2

6.8 5.6 1.2

6.4 7.8 -1.4

7.2 4.8 2.4

6.6 7.2 -0.6

7 5.2 1.8

6.6 9.8 -3.2

8.4 7.8 0.6

-10 -5 0 5 10

Difference in Means

0.0

0.1

0.2 Pro

po

rtion

pe

r Ba

r

0

50

100

150

200

250

Nu

mb

er

of O

bse

rva

tio

ns 1000 observations

Distribution of differences

OK, now what?

Page 21: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Compare distribution of differences to real

difference

Number inside Number outside

3 10

5 7

2 9

8 12

7 8

Mean 5 9.2

Real difference = 4.2

Page 22: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Estimate likelihood that real difference comes from

two similar distributions

Mean 1 Mean 2 Difference

10.2 3.6 6.6 1

10 3.8 6.2 0.999

10.2 4.4 5.8 0.998

9.2 3.6 5.6 0.997

9.8 4.8 5 0.996

8.8 4.2 4.6 0.995

9.6 5.2 4.4 0.994

9.8 5.6 4.2 0.993

9.8 5.8 4 0.992

9.4 5.4 4 0.991

And on through 1000 differences

Proportion of

differences less than

current

Likelihood is 0.007 that

distributions are the same

What are constraints of

this sort of approach?

Page 23: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

T-test vs resampling

Test P-value

Resampling 0.007

T-test 0.019 Why the difference?

Pooled Variance

Variable Treatment Mean

Difference

95.00% Confidence

Interval

t df p-Value

Lower Limit Upper Limit

Number Inside -4.2 -7.49363 -0.90637 -2.94059 8 0.018693

Outside

Variable Treatment N Mean Standard

Deviation

Number Inside 5 5 2.54951

Outside 5 9.2 1.923538

Two-Sample t-Test

OutsideInside

Treatment

0123

Count

0

5

10

15

Num

ber

0 1 2 3

Count

0

5

10

15

Num

ber

Page 24: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Statistical analysis - cause, probability, and effect

I) What counts as a difference - this is a statistical

philosophical question of two parts

A) How shall we compare measurements - statistical

methodology

B) What will count as a significant difference -

philosophical question and as such subject to

convention

II) Statistical Methodology - General

A) Null hypotheses - Ho

1) In most sciences, we are faced with:

a) NOT whether something is true or false

(Popperian decision)

b) BUT rather the degree to which an effect exists

(if at all) - a statistical decision.

2) Therefore 2 competing statistical hypotheses are

posed:

a) HA: there is a difference in effect between

(usually posed as < or >)

b) HO: there is no difference in effect between

INSIGHT

Existing Theory

General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

(and predictions) Confirmation Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

Specific hypothesis HA: Number of oak seedlings is

Greater in areas outside impact

Sites than inside impact sites

H supported (accepted)

H rejected O

A

H rejected

H supported (accepted) O

A

Page 25: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Statistical tests - a set of rules whereby a decision about hypotheses is reached

(accept, reject)

1) Associated with rules - some indication of the accuracy of the decisions -

that measure is a probability statement or p-value

2) Statistical hypotheses:

a) do not become false when a critical p-value is exceeded

b) do not become true if bounds are not exceeded

c) Instead p-values indicate a level of acceptable uncertainty

d) critical p-values are set by convention - what counts as acceptable

uncertainty

e) Example - if critical p-value = 0.05 this means that we are unwilling to

accept the posed alternative hypothesis unless:

1) we 95% sure that it is correct, or equivalently that

2) we are willing to accept an error rate of 5% or less that we are wrong

when we accept the hypothesis

Statistical analysis - cause, probability, and effect

Page 26: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

The logic of statistical tests - how they are performed 1) Assume the Null Hypothesis (H o ) is true (e.g. no difference in number of

Oak seedlings in impact and non - impact sites).

2) Compare measurements - generally this means comparing two sample

distribution s (determined from the numbers from the experiment or survey)

A) Comparison of distributions - generally by comparing means and the

estimate of error associated with the sampling of the means

simplest case is the Standard E rror of the M ean (SE or SEM) = Sx

.5 sd/n = standa rd deviation / square root of level of replication

3) Determine the probability that distributions are similar/different

4) Compare with a critical p - value to assign significance

.

Statistical analysis - cause, probability, and effect

Page 27: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

0 5 10 15 20 25 30 35 40 45 50

VALUES

Distribution of Oak Seedlings - pre-impact

Sites = 100

Mean per site = 25

Total seedlings = 2500

Calculation of statistical distributions

Page 28: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

x fifty iterations

Example: sample 10 sites to determine mean

Evaluate effect of sample size on calculation of

and confidence in Mean Compare 50 iterations for sample size's of 10 cells ,

22 27

12

33

25

41

31

23

19

36

23

24

36

28

28 25

17 21

40

16

X=21.5 X=25.8

Page 29: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

True Mean = 25

22 27

12

33

25

41

31

23

19

36

Mean = 21.5

23

24

36

28

28 25

17 21

40

16

Mean = 25.8

Means

21.5

22.3

23.0

23.9

24.9

25.1

25.8

26.5

27.8

29.9

Estimate of Mean N

um

ber

of

case

s

Page 30: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Do we ever do this?

that is, take repeated samples to generate a

distribution of means?

• One approach that approximates this is

resampling, which uses measured observations to

build a distribution of means.

– Limited by…

• Other more traditional approach is to approximate

distribution of means using a statistical

distribution

– What is needed

• Mean

• Standard deviation

Page 31: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Estimate of Mean

Nu

mb

er o

f ca

ses

Estimate of Mean

Nu

mb

er o

f ca

ses

True distribution of means

Can be

approximated

By mean and standard

error of a single sample

Page 32: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Also there is an effect of number of observations on

estimate of population mean

15 20 25 30 35

Estimate of Mean

0

4

8

12

16

Num

ber

of ca

ses

99

50

20

10

5

Mean based on

X observations

Frequency distributions of sample means

Page 33: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Type 1 and Type II error.

1) By convention, the hypothesis tested is the null hypothesis (no difference

between)

a) In statistics, assumption is made that a hypothesis is true (assume H O true =

assume H A false)

b) accepting H O (saying it is likely to be true) is the same as rejecting H A

(falsification)

c) Scientific method is to falsify competing alternative hypotheses (alternative

H A ’s)

2) Errors in decision making

Decision

Truth Accept H O Reject H O

H O true no error (1 - ) Type I error ( )

H O fal se Type II error ( ) no error (1 - )

Type I error - probability that we mistakenly reject a true null hypothesis (H O )

Type II error - probability that we mistakenly fail to reject (accept) a false null

hypothesis

Power of Test - probability (1 - ) of n ot committing a Type II error - The more powerful

the test the more likely you are to correctly conclude that an effect exists when it really

does (reject H O when H O false = accept H A when H A true).

Types of statistical error – Type 1 and II

Page 34: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

INSIGHT

Existing Theory

General hypothesis

Previous Observations

Perceived Problem

Belief

Comparison with

new observations

Specific hypotheses

(and predictions) Confirmation

Falsification

Conception

Assessment

- Inductive reasoning

- Deductive reasoning

H supported (accepted)

H rejected O

A

H rejected

H supported (accepted) O

A

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha) Type I error

(alpha)

H O false Type II error (beta) no error (1-beta)

Scientific method and

statistical errors

Page 35: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha) Type I error (alpha)

H O false Type II error (beta) no error (1-beta)

INSIGHT

Existing Theory

Oil affects Oak seedlings

Oil leaking on a number

of sites with Oaks

Perceived Problem

Belief

Compare Seedling #

on “impact and control

sites

Seedling # will be higher

In control sites than on

“impact” sites

Confirmation Falsification

Conception - Inductive reasoning

Assessment - Deductive reasoning

H supported (accepted)

H rejected O

A

H rejected

H supported (accepted) O

A

No difference More seedlings in

control sites

Scientific method and

statistical errors

- case example

Page 36: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha) Type I error (alpha)

H O false Type II error (beta) no error (1-beta)

Monitoring Conclusion

Biological Truth No Impact Impact

No Impact Correct decision

No impact detected

Type 1 Error

False Alarm

Impact Type II Error

Failure to detect

real impact; false

sense of security

Correct decision

Impact detected

Error types and implications in basic and

environmental science

What type of

error should we

guard against?

Page 37: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

y 1

y 2

Statistical comparison of two distributions

Statistical Power, effect size, replication and alpha

Page 38: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Sampling Objectives

• To obtain an unbiased estimate of a population mean

• To assess the precision of the estimate (i.e. calculate the standard error of the mean)

• To obtain as precise an estimate of the parameters as possible for time, effort and money spent

Page 39: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

• Population mean (m) - the average value

• Sample mean = estimates m (true mean)

• Population median - the middle value

• Sample median estimates population median

• In a normal distribution the mean=median (also the mode), this is not ensured in other distributions

y

Y Y

Mean & median Mean Median

Measures of location

Page 40: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Measures of dispersion

• Sample variance (s2) estimates population variance

• Standard deviation (s)

– square root of variance

– same units as original variable

(xi - x)2

n - 1

Page 41: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Measures (statistics) of Dispersion

Sample variance s2 =

Sample

standard deviation s =

Standard error

of the mean se =

• Note, units are squared

• Denominator is (n-1)

• Note, units are not squared

Sample Sum of Squares SS = (xi - x)2

(xi - m)2

n

(xi - x)2

n - 1

(xi - x)2

n - 1

s2

n = n

s

n

s

Page 42: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

t statistic

• Assuming Null

Hypothesis is true:

– Transforms differences in

means to a value from

distribution having a mean

of 0 and standard deviation

of 1 n s /

- y1 y2

Page 43: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

-5 -4 -3 -2 -1 0 1 2 3 4 50.0

0.1

0.2

0.3

0.4

Pro

ba

bili

ty

ns /

-y1 y2

Area under the curve = 1.00

Null distribution

Ho:

= y1 y2

Page 44: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

t statistic – interpretation and

units • The deviation between means

is expressed in terms of

Standard error (i.e. Standard

deviations of the sampling

distribution)

• Hence the value of t’s are in

standard errors

• For example t=2 indicates that

the deviation (y1- y2) is equal to

2 x the standard error

ns /

-y1 y2

Page 45: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

10

20

30

Co

un

t

0.0

0.1

0.2

0.3

Pro

po

rtion

pe

r Ba

r

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

y1

y2

y1

y2

Ho true: Distributions of means are truly the same

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-4 -3 -2 -1 0 1 2 3 4

t - value

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

t distribution

Page 46: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

10

20

30

Co

un

t

0.0

0.1

0.2

0.3

Pro

po

rtion

pe

r Ba

r

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

y1

y2

y1

y2

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-4 -3 -2 -1 0 1 2 3 4

t - value

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

t distribution

Ho true: Distributions of means are truly the same

1) Estimate of y1 = estimate of y2

Page 47: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

10

20

30

Co

un

t

0.0

0.1

0.2

0.3

Pro

po

rtion

pe

r Ba

r

9.5 9.7 9.9 10.1 10.3 10.5

Mean Value from Sample

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

y1

y2

y1

y2

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-4 -3 -2 -1 0 1 2 3 4

t - value

0

5

10

15

20

25

Co

un

t

0.0

0.1

0.2

Pro

po

rtion

pe

r Ba

r

t distribution

Ho true: Distributions of means are truly the same

2) Estimate of y1 = estimate of y2

Page 48: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Ho true: Distributions of means are truly the same

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

0

t distribution (df)

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

y1

y2

Page 49: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

t

assign critical p (assume = 0.05)

t c

Ho true: Distributions of means are truly the same

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

0

If distributions are truly the same then: area to right of critical t C

> t C will cause incorrect conclusion that distributions are different

represents the Type 1 error rate (Blue); any calculated t

t distribution (df) y1 -

t =y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

Page 50: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Ho false: Distributions of means are truly different

y1 y2

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-5 0 5 10

t - value

0

10

20

30

40

Co

un

t

0.0

0.1

0.2

0.3

0.4

Pro

po

rtion

pe

r Ba

r

Page 51: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Ho false: Distributions of means are truly different

y1 y2

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-5 0 5 10

t - value

0

10

20

30

40

Co

un

t

0.0

0.1

0.2

0.3

0.4

Pro

po

rtion

pe

r Ba

r

Page 52: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Ho false: Distributions of means are truly different

y1 y2

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

9.5 10.0 10.5 11.0

Mean value from sample

0

10

20

30

40

50

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

Pro

po

rtion

pe

r Ba

r

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

-5 0 5 10

t - value

0

10

20

30

40

Co

un

t

0.0

0.1

0.2

0.3

0.4

Pro

po

rtion

pe

r Ba

r

Page 53: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

0

t distribution (df)

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

Central t distribution

Non-central t distribution

Ho false: Distributions of means are truly different

t

y1 y2

Page 54: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

assign critical p (assume = 0.05)

t c

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

Ho false: Distributions of means are truly different

If distributions are truly different then: area to left of critical t C

< t C will cause incorrect conclusion that distributions are same

represents the Type II error rate (Red); any Calculated t

0

t distribution (df) y1 -

t =y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

Central t distribution

t

Page 55: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

0

t c

Type I error Type II error

Critical p

How to control Type II error (distributions are truly different)

This will maximize statistical power to detect real impacts

1) Vary critical P-Values

2) Vary Magnitude of Effect

3) Vary replication

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

Central t distribution

t

Page 56: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

0

t c

Type I error Type II error

Critical p

How to control Type II error (distributions are truly different)

1) Vary critical P-Values (change blue area)

t c

Critical p

t c

Critical p

Reference

A) Make critical P more

stringent (smaller)

A) Relax critical P (larger values)

Type II error increases

Power decreases

Type II error decrease

Power increases

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

tt

Page 57: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

How to control Type II error (distributions are truly different)

2) Vary magnitude of effect (vary distance between y1 and y2, which affects non-central t

distribution

9.5 10.5 11.5 12.5

Mean value from sample

0

10

20

30

40

50

60

70

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Pro

po

rtion

pe

r Ba

r

9.5 10.5 11.5 12.5

Mean value from sample

0

10

20

30

40

50

60

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

0.6

Pro

po

rtion

pe

r Ba

r9.5 10.5 11.5 12.5

Mean value from sample

0

10

20

30

40

50

60

70

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Pro

po

rtion

pe

r Ba

r

-5 0 5 10 15 20

t value

0

10

20

30

40

50

60

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

0.6

Pro

po

rtion

pe

r Ba

r

-5 0 5 10 15 20

t value

0

10

20

30

40

50

60

Co

un

t

0.0

0.1

0.2

0.3

0.4

0.5

0.6

Pro

po

rtion

pe

r Ba

r

A.

B.

C.

B vs A

C vs A

y1 -t =

y2

1

n1

1

n2

+sp

y1 -t =

y2

1

n1

1

n2

+sp

y = 10

y = 10.5

y = 12

Page 58: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

0

t c

Type I error Type II error

Critical p

t c

Reference

A) Make distance smaller

A) Make distance greater

Type II error increases

Power decreases

Type II error decreases

Power increases

0

t c

How to control Type II error (distributions are truly different)

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

0

2) Vary magnitude of effect (vary distance between y1 and y2, which affects non-central t

distribution

tt

tt

tt

Page 59: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

How to control Type II error (distributions are truly different)

t c

Type I error Type II error

Critical p

Reference

A) Decrease replication

A) Increase replication

Type II error increases

Power decreases

Type II error decrease

Power increases

t c

Decision

Truth Accept H O Reject H O

H O true no error (1-alpha)

Type I error (alpha)

H O false Type II error (beta)

no error (1-beta)

t c

3) Vary replication (which controls estimates of error)

- Note Type 1 error is constant and tc is allowed to vary

0

0

0

tt

tt

tt

Page 60: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

T-test vs resampling

Test P-value

Resampling 0.007

T-test 0.019 Why the difference?

Pooled Variance

Variable Treatment Mean

Difference

95.00% Confidence

Interval

t df p-Value

Lower Limit Upper Limit

Number Inside -4.2 -7.49363 -0.90637 -2.94059 8 0.018693

Outside

Variable Treatment N Mean Standard

Deviation

Number Inside 5 5 2.54951

Outside 5 9.2 1.923538

Two-Sample t-Test

OutsideInside

Treatment

0123

Count

0

5

10

15

Num

ber

0 1 2 3

Count

0

5

10

15

Num

ber

Page 61: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Replication

Power

Low

High

Low High

Magnitude of Effect

Power

Low

High

Small Large

Critical alpha

Power

Low

High

Low High

POWER

Page 62: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Type I error, Power and

experimental design • Assume you want to know if predation affects Triplefin

density

• You want to be able to detect:

– 20% difference in density

– Have power = 80% (0.8)

– Have critical alpha (Type 1 error) = 0.05

• You conduct a preliminary survey before you set up the

experiment to estimate density

– Now determine sample size necessary for your experiment

• Can it be done???

Page 63: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Preliminary survey

Replicate Sample 1 Sample 2

1 3 6

2 9 9

3 18 13

4 15 8

5 10 12

6 8 15

7 15 9

8 7 10

9 6 13

10 11 7

Mean 10.2 10.2

Standard Deviation 4.6 2.9

Page 64: The linkage between Popperian science and statistical analysis · PDF fileThe linkage between Popperian science and statistical analysis . The Philosophy of science: the scientific

Replication and independence

Control sites Impact sites

Pseudoreplication

in space

Pseudoreplication

in time

Pseudoreplication

in time and space