Calvin and Hobbes cartoon - John Pais' Instructional

Download Report

Transcript Calvin and Hobbes cartoon - John Pais' Instructional

 eatworms.swmed.edu/~leon
 [email protected]
Basic Statistics

Combining probabilities

Samples and
Populations

Four useful statistics:
– The mean, or average.
– The median, or 50%
value.
– Standard deviation.
– Standard Error of the
Mean (SEM).

Three distributions:
– The binomial distribution.
– The Poisson distribution.
– The normal distribution.

Four tests
– The chi-squared
goodness-of-fit test.
– The chi-squared test of
independence.
– Student’s t-test
– The Mann-Whitney U-test.
Combining probabilities
 When
you throw a pair of dice, what is the
probability of getting 11?
Combining probabilities
 The
probability that all of several
independent events occurs is the product
of the individual event probabilities.
 The
probability that one of several
mutually exclusive events occurs is the
sum of the individual event probabilities.
Combining probabilities
 When
you throw a pair of dice, what is the
probability of getting 11?
 When
you throw five dice, what is the
probability that at least one shows a 6?
Combining probabilities
 When
you throw a pair of dice, what is the
probability of getting 11?
 When
you throw five dice, what is the
probability that at least one shows a 6?
5
5
P  1     0 . 598
6
Populations and samples
 What
proportion of the population is
female?
Populations and samples
 What
proportion of the population is
female?
 Abstract populations: what does a mouse
weigh?
Populations and samples
 What
proportion of the population is
female?
 Abstract populations: what does a mouse
weigh?
 Population characteristics:
– Central tendency: mean, median
– Dispersion: standard deviation
Four sample statistics
S a m p le m e a n :
x 
1
N
 xi
S a m p le m e d ia n :
M is th e m id d le v alu e in a sam p le of od d size, th e a vera ge of th e
tw o m id d le v alu es in a sam p le of eve n size.
S a m p le s ta n d a rd d e via tio n :
sx 
 xi  x 
N 1
2
 xi
2

S ta n d a rd E rro r o f th e M e a n :
S .E .M .  s /
N
 Nx
N 1
2
Standard deviation and SEM
 Use
standard deviation to describe how
much variation there is in a population.
– Example: income, if you’re interested in how
much income varies within the US population.
 Use
SEM to say how accurate your
estimate of a population mean is.
– Example: measurement of -gal activity from
a 2-hybrid test.
Sample stats: recommendations
 When
you report an average, report it as
mean  SEM.
 Same for error bars in graphs.
 In the figure caption or the table heading or
somewhere, say explicitly that that’s what
you’re reporting.
 Use the median for highly skewed data.
Three distributions

The binomial distribution
– When you count how many of a sample of fixed size
have a certain characteristic.

The Poisson distribution
– When you count how many times something happens,
and there is no upper limit.

The normal distribution
– When you measure something that doesn’t have to be
an integer or when you average several continuous
measurements.
The binomial distribution
W hen y o u cou nt h ow m an y of a sam ple of fixed size h av e a
certain characteristic.
P aram eters:
N : the fixed sam ple size
p: th e pro bability that on e thing has th e ch aracteristic
q: th e pro bability that it d oesn’t: (1 -p)
F orm ula:
Pr( n ) 
N!
n!  N  n  !
n
p q
N n
E xam ple:
F em ales in a p o pulatio n, anim als havin g a certain g enetic
characteristic.
The Poisson distribution
W hen you count how m any tim es som ething happens,
and there is no (or only a very large) upper lim it.
P aram eter:
 : the population m ean
F orm ula:
 e
n
Pr( n ) 

n!
E xam ple:
R adioactivity counts, positive clones in a library.
The normal distribution
W hen you m easure a som ething that doesn’t have to be an
integer, e.g. w eight of a m ouse, or velocity of an enzym e
reaction, and especially w hen you average several such
continuous m easurem ents.
P aram eters:
 : the population m ean
2
 : the population variance
F orm ula:
Pr( x ) 
1

2
 ( x   ) / 2
2
e
2
E xam ple:
W eight, heart rate, enzym e activity…
Hypothesis testing
A genetic mapping problem
M o m ’s g en o ty p e:
D a d ’s g en o ty p e:
At SSR:
 /
 /
A t d isease lo cu s:
e/+
e/+
A ssu m e w e k n o w th at M om in h erited b o th th e  allele o f th e S S R an d
th e e m u tatio n fro m h er fath er, an d lik ew ise th at D ad in h erited  an d e
fro m h is fath er.
S u p p o se S S R an d d isease lo cu s are u n lin k ed (th e nu ll hy p oth esis).
W h at is th e p ro b ab ility th at an ep ilep tic ( e/e) ch ild h as S S R g en o ty p e
 / ?
A genetic mapping problem
M o m ’s g en o ty p e:
D a d ’s g en o ty p e:
At SSR:
 /
 /
A t d isease lo cu s:
e/+
e/+
A ssu m e w e k n o w th at M om in h erited b o th th e  allele o f th e S S R an d
th e e m u tatio n fro m h er fath er, an d lik ew ise th at D ad in h erited  an d e
fro m h is fath er.
S u p p o se S S R an d d isease lo cu s are u n lin k ed (th e nu ll hy p oth esis).
W h at is th e p ro b ab ility th at an ep ilep tic ( e/e) ch ild h as S S R g en o ty p e
 / ?
A n sw er: 1 /4
N o w su p p o se th at S S R an d d isease lo cu s are g en etically lin k ed . W hat is
th e p ro b ab ility th at an ep ilep tic (e/e) ch ild h as S S R gen o ty p e  /  ?
A genetic mapping problem
M o m ’s g en o ty p e:
D a d ’s g en o ty p e:
At SSR:
 /
 /
A t d isease lo cu s:
e/+
e/+
A ssu m e w e k n o w th at M om in h erited b o th th e  allele o f th e S S R an d
th e e m u tatio n fro m h er fath er, an d lik ew ise th at D ad in h erited  an d e
fro m h is fath er.
S u p p o se S S R an d d isease lo cu s are u n lin k ed (th e nu ll hy p oth esis).
W h at is th e p ro b ab ility th at an ep ilep tic ( e/e) ch ild h as S S R g en o ty p e
 / ?
A n sw er: 1 /4
N o w su p p o se th at S S R an d d isease lo cu s are g en etically lin k ed . W hat is
th e p ro b ab ility th at an ep ilep tic (e/e) ch ild h as S S R gen o ty p e  /  ?
A n sw er: S o m eth in g less th an 1 /4
The experiment
at the SSR genotype of 40 e/e kids.
 If about 1/4 are /, the SSR is probably
unlinked.
 If the number of / is much less than 1/4,
the SSR is probably linked.
 We’re going to figure out how to make the
decision in advance, before we see the
results.
 Look
Expected results if unlinked
Binomial, N=40, p=0.25
0.16
0.14
0.12
Pr(x)
0.1
0.08
0.06
0.04
0.02
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
x
Is the SSR linked?
 We
want to know if the SSR is linked to
the epilepsy gene.
 What would your answer be if:
– 10/40 kids were /?
– 0/40 kids were /?
– 5/40 kids were /?
 Need
a way to set the cut-off.
Type I errors
 Suppose
that in reality, the SSR and the
epilepsy gene are unlinked.
 Still, by chance, the number of / in our
sample may be <cut-off.
 We would decide incorrectly that the genes
were linked.
 This is a type I error.
What’s the probability of a type I
error () if we cut off at 5?
x0 Pr(x = x0) Pr(x <= x0)
0
0.00001
0.00001
1
0.00013
0.00014
2
0.00087
0.00102
3
0.00368
0.00470
4
0.01135
0.01604
5
0.02723
0.04327
Probability of a type I error
Binomial, N=40, p=0.25
0.20
0.18
0.16
Probability
0.14
0.12
x = cut-off
0.10
type I error
0.08
0.06
0.04
0.02
0.00
0
2
4
6
8
10
12
14
16
18
20
cut-off
22
24
26
28
30
32
34
36
38
40
Some terminology
 The
hypothesis that nothing special is
going on is the null hypothesis, H0.
 A type I error is the rejection of a true null
hypothesis.
 The probability of a type I error is called ,
or the level of significance.
Levels of significance
 “Statistically
significant,” if nothing more
precise is added, means significant at P ≤
5%.
 “Highly significant” is less universal, but
typically means P ≤ 1%.
 The other level worth distinguishing is
P ≤ 0.1%.
 Recommendation: stick with these levels,
don’t report ridiculously low probabilities.
How many tails?
The test I have just described is a one-tailed
test, because we were only interested in the
possibility that the frequency of / was less than
¼.
 More commonly, you want to test whether an
observation is either less than or greater than a
predicted value.
 In that case you need two cutoffs, a lower one
and an upper one.
 The probability of a type I error will then be the
sum of the probability of too low a number and
the probability of too high a number.

Two tails of the binomial
Binomial, N=40, p=0.25
0.14
0.12
P
0.1
P
0.08
Pclt
Pcut
0.06
0.04
0.02
0
0
2
4
6
8
10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
n
The two-tailed test
 Typically
we put half of the probability
(2.5%) in each tail.
 Our decision rule will be to reject if n ≤ 4 or
if n ≥ 16.
 This is called a two-tailed test.
 Recommendation: if you are at all
uncertain, do a two-tailed test.
Statistical tests

Chi-squared goodness-of-fit test:
– Test whether a single measurement from a binomial matches a
theoretical value.
– Test whether two Poisson distributions have equal means (by
testing whether one measurement is 50% of the sum).

Chi-squared test of independence:
– Test whether two binomial distributions have equal means.

Student’s t test:
– Test whether two normal distributions have equal means.

Mann-Whitney U test:
– Test whether two samples come from distributions with the same
location. Can be used with any continuous distribution.
Test on the probability of a
binomial variable
You looked at N things (people in the room for
instance), and counted the number n who
matched some criterion (female, for instance).
 The null hypothesis is that this is a binomial with
probability p0 (some definite value that you
predict based on theory).
 Chi-squared goodness-of-fit test.
 Example: progeny classes from genetic cross.

Tests of independence
 When
you have measured two binomial
variates to test if the p of the two
distributions is the same.
 Chi-squared test of independence.

For instance, suppose we want to know if the proportion
of biologists who are women is different from the
proportion of doctors who are women. So we count
some biologists and some doctors and we find that 24/61
biologists are women (39%), but 36/72 doctors are
women (50%). We could use a chi-squared test to find
out if this difference is significant. (Turns out it isn’t even
close.)
Student’s t test on the means of
normal variables
This is when you have two sample averages and
you want to know if they’re different.
 For instance, maybe you have weighed mice
that are homozygous for a gene knockout and
their heterozygous siblings. The hotes weigh
less, a common sign that they’re unhealthy in
some way, and you want to know if the
difference is significant.
 This test assumes that weight (or at least the
average of several weights) is normally
distributed.

The Mann-Whitney U test
 Used
under almost exactly the same
circumstances as the t-test. For instance,
you could use it to compare mouse
weights.
 Doesn’t compare averages; compares the
positions of the entire distributions.
 This test makes NO ASSUMPTIONS
about the underlying distributions.
 Probably the most useful of all statistical
tests.
THINK