# PowerPoint Presentation

Document Sample

```					Statistics Review for
CM 160/260
Topics
• Counting
– Permutations
– Combinations
• Set Theory
• Probability & Conditional Probability
– Independence
– Bayes Theorem
• Random Variables
– Discrete vs. Continuous
– Probability Density Function (pdf)
• Simple discrete, Uniform, Binomial,…
– Expectation & Variance

Counting
• Experiments?
– Coin toss, die roll, DNA sequencing

• Basic Principle of Counting:
– For r number of experiments
– First Experiment can have n1 possible
outcomes, second experiment n2, third n3,…
– Total number of possible outcomes is
n 1* n 2* n 3*…* n r
Factorials
m! = m(m-1)(m-2)(m-3)…*3*2*1

5! = 5*4*3*2*1 = 120
0! = 1
1! = 1
100! = 100*99*98*…*3*2*1 = ~9 x 10157
Permutations
• Groups of Ordered arrangements of things
– How many 3 letter permutations of the letters a, b, & c
are there?
• abc, acb, bac, bca, cba, cab  6 total
– Can use Basic Principle of Counting:
•3*2*1 = 6
n!
– General Formula:       Pn , k   
( n  k )!
– n = total number of things
– k = size of the groups your taking
k<n
3!/(3-3)! = 6
Permutations
• What if some of the things are identical?
– How many permutations of the letters
a, a, b, c, c & c are there?

n!            Where n1, n2, … nr are
the number of objects
n1! n2 !... nr !        that are alike

6! / (3!2!) = 60
Combinations
• Groups of things (Order doesn’t matter)
– How many 3 letter combinations of the letters a, b, & c
are there?     1: abc
– How many 2 letter combinations of the letters a, b, & c
are there?     3: ab, ac, bc
• ab = ba; ac = ca; bc = cb      *Order doesn’t matter

 n      n!
– General Formula:         Cn,k    
 k  k!(n  k )!
 
– n = total number of things
– k = size of the groups your taking
k<n
“n choose k”

Set Theory
• Sample Space of an experiment is the set of all
possible values/outcomes of the experiment
S = {a, b, c, d, e, f, g, h, i, j}   S = {Heads, Tails}
S = {1, 2, 3, 4, 5, 6}

E = {a, b, c, d}              F = {b, c, d, e, f, g}


E S                     F S
Ec = {e, f, g, h, i, j}       Fc = {a, h, i, j}
E  F = {a, b, c, d, e, f, g}
E  F = EF = {b, c, d}
Venn Diagrams

S

E         F

G

Simple Probability
• Frequent assumption: All Outcomes Equally likely
to occur
• The probability of an event E, is simply:
Number of possible outcomes in E
Number of Total possible outcomes
S = {a, b, c, d, e, f, g, h, i, j}
E = {a, b, c, d}           F = {b, c, d, e, f, g}
P(E) = 4/10                P(F) = 6/10

P(S) = 1     0 < P(E) < 1      P(Ec) = 1 – P(E)
P(E  F) = P(E) + P(F) – P(EF)

Independence
• Two events, E & F are independent if
neither of their outcomes depends on the
outcomes of others.

• So if E & F are independent, then:
P(EF) = P(E)*P(F)

• If E, F & G are independent, then:
P(EFG) = P(E)*P(F)*P(G)
S
Conditional
Probability               E      EF       F

• Given E, the
probability of F is:
P ( EF )
P( F | E ) 
P( E )

P ( EF )
• Similarly:   P( E | F ) 
P( F )
S
Bayes Theorem
E   EF   F
• Solve for P(EF) to
get:
P( EF )  P( E | F ) P( F )
P( EF )  P( F | E ) P( E )
• Combine them to get:

P( E | F ) P( F )
P( F | E ) 
P( E )
S
Bayes Theorem
Observed   Hidden

• In terms we use:

P(O | H ) P( H )
P( H | O) 
P(O)
S
Bayes Theorem
Observed      Hidden

• Also:

P( E )   P( E | F ) P( F )
F

• In our terms: P (O )        P(O | h) P(h)
h
Bayes Theorem
P(O | H ) P( H )
P( H | O) 
P(O)
P(O | H ) P( H )
P( H | O)     n

 P(O | h ) P(h )
i 1
i        i
Random Variables
• Definition: A variable that can have
different values
– Each value has its own probability
• X = Result of coin toss

• Y = Result of die roll
– 1, 2, 3, 4, 5, 6 each 1/6
Discrete vs. Continuous
• Discrete random variables can only take a
finite set of different values.
– Die roll, coin flip

• Continuous random variables can take on an
infinite number (real) of values
– Time of day of event, height of a person

Probability Density Function
• Many problems don’t have simple
probabilities. For those the probabilities are
expressed as a function…
• aka “pdf”

pdf (a)  P( X  a)            Plug a into some function
i.e. 2a2 – a3


 pdf ( x )  1
i 1
i
Some Useful pdf’s
• Simple cases (like fair/loaded coin/dice,
etc…)
P( X  a)  pdf (a)  
.5       For a = Tails

• Uniform random variable (“equally likely”)
1
P( X  a)  pdf (a) 
a
pdf of a Binomial
• You will need this

 n  k nk
P( X  k )  pdf (k )    p q
k 
 
• Where p = P(success) & q = P(failure)
• P(success) + P(failure) = 1
• n choose k is the total number of possible
ways to get k successes in n attempts
Using the p.d.f.
• What is the Probability of getting 3 Heads
in 5 coin tosses? (Same as 2T in 5 tosses)
n = 5 tosses    k = 3 Heads
p = P(H) = .5   q = P(T) = .5
 5
• P(3H in 5 tosses)   =  3 p3q2
 
 
= 10p3q2
= 10*P(H)3*P(T)2
= 10(.5)3(.5)2 = 0.3125
Notice how these are Binomials…
• What is the probability of winning the
lottery in 2 of your next 3 tries?
n = 3 tries      k = 2 wins
Assume P(win) = 10-7 P(lose) = 1-10-7
 3
• P(win 2 of 3 lotto) =  P(win)2P(lose)
 2
 
= 3(10-7)2(1-10-7)
= ~ 3*10-14
• That’s about a 3 in 100 trillion chance.
Good Luck!
It may be important…
• Assume that Kobe stays on a hot streak,
shooting a constant 66% (~2/3). What is
the probability that he will make 25 of 30
field goals?
n = 30       k = 25
P(score) = 2/3      P(miss) = 1/3
 30
• P(25 for 30) =   P(score)25P(miss)5
 25
 
= 142506(2/3)25(1/3)5
= 0.0232
Expectation of a Discrete
Random Variable
• Weighted average of a random variable

E[ X ]        xP( x)
x:P ( x ) 0

• …Of a function

E[ g ( X )]   g ( xi ) P ( xi )
i

Variance
• Variation, or spread of the values of a
random variable

Var( X )  E[( X   ) ]            2

 E[ X ]  ( E[ X ])
2                       2

• Where μ = E[X]

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 1 posted: 7/18/2012 language: English pages: 26
How are you planning on using Docstoc?