Lecture 1: Random Walks, Distribution Functions

Download Report

Transcript Lecture 1: Random Walks, Distribution Functions

Lecture 1:
Random Walks, Distribution Functions
Probability and Statistics: Fundamental in most parts of astronomy
Examples:
•
•
•
•
Description of “systems”
 motion of molecules in an ideal gas
 motion of stars in a globular cluster
 description of radiation field
Stochastic phenomena
Radiative Transfer
Estimating experimental uncertainties
Probability
The probability P of a particular outcome of an experiment is an
estimate of the likely FRACTION of a number of repeated
observations which lead to a particular outcome
N(A)
P
N(tot
)
Where N(A) = # of outcomes A
N(tot) = Total # of possible outcomes
Example: Flip a coin, A = “heads”, then P = 1/2
One-Dimensional Random Walk
Flip a coin -- move +1 steps if heads, -1 steps if tails
…---x -------- x -------- x -------- x -------- x -------- x-------- …
-2
-1
0
+1
+2
+3
Consider the probability of ending up at a particular position after n steps:
0
Position
…
+3
+2
+1
0
-1
-2
-3
1
2
3 … Number of steps
1/8
3 heads
3/8
2 heads
3/8
1 head
1/8
0 heads
¼
☺
½
2/4
½
¼
P(m,n) = Probability of ending up at position m after n steps
=
In n steps,
#
paths
leadin
position
to
n
g
#
possible
paths
leadin
an
to
position
y g
# possible paths = 2 n
(each step has 2 outcomes)
# paths leading to a particular position m
= # of ways of getting k heads
n
n
!

k
k
  !(nk)!
Where
Binomial coefficient, or “n over k”
n! = n(n-1)(n-2) … (2)(1)
recall
0! =1
1! = 1
“n-factorial”

NOTE:
The binomial coefficients
n

k



appear in the expansion
a  b  
n
n
k 0
n
 
k
k
a b
n k
Does this formula work in our 1-dimensional random walk example?
Let
n=3
n
2 =8
suppose k =2
after 3 steps, there are 8 possible paths
(Two heads):
3 3 21
  
3
2!
2
so P  3/8
More generally, for each individual event,
OK!
P

1/2
Binomial Distribution
Probability of getting k successes out of n tries,
when the probability for success in each try is p
n-k
n k

P(k,n, p)
p)
k p (1
 
n
n!



k k!(nk)!
 
MEAN: If we perform an experiment n times, and ask how many successes
are observed, the average number will approach the mean,


k
P
(
k
,
n
,
p
)
np

n
k

0
VARIANCE:
(k
-
) P(k,n,p)

2
n
2
k
0
n p
1
-p)
(
Example:
Suppose we roll a die 10 times.
What is the probability that we roll a “2” exactly 3 times?
If we throw the die once, the probability of getting a “2” is p = 1/6
For n = 10 rolls of the die, we expect to get k = 3 successes
with probability
n-k
n k

P(k,n, p)
p)
k p (1
 
n
n!



k k!(nk)!
 
3
SO…
10
3
1
5




1
10
!
P
(
3
,
1
,)
0

0 .1 5




63
(1
!
30
)!6
6




The binomial distribution for n = 10, p=1/6.
The mean value is 1.67
The standard deviation (sqrt of variance) is 1.18
Poisson Distribution
Assymptotic limit of the binomial distribution for p << 1
 Large n, constant mean
 small samples of large populations

P
(k
,
)
k


e
k!
The poisson distribution P(k,1.67).
The mean is 1.67, standard deviation is 1.29
Similar to binomial distribution, but is defined for k>10
For example, P(20,1.67) = 2.2x10
-15
Gaussian Distribution
Gives the most probable
estimate of the true mean,
µ, of a random sample of
observations, as n  ∞
2


kμ
1



1
P
(
k
,
,

)

exp
  

2
2
   




The normal, or Gaussian, distribution
In units of standard deviation, σ
With origin at the mean value µ
The area under the curve = 1
Random Walk
• How far do you get from the origin after n steps?
• Plot distance from origin as a function of n = number of steps
• As n increases, you stray further and further from the starting point
during an individual experiment
• On the other hand, the average distance of all experiments is ZERO
 as many experiments end up +ve as –ve
Root-mean-square distance
After n steps,
each of unit distance
RMS distance traveled =
sqrt(n)
(can show)
 Animated Gif
 Binomial distribution Applet