0 . 16 c 0 p ( a ) P ( X a ) p ( a , y - - PDF document

0 16 c 0 p a p x a p a y 0 0 16 0 12
SMART_READER_LITE
LIVE PREVIEW

0 . 16 c 0 p ( a ) P ( X a ) p ( a , y - - PDF document

The Questions of Our Time Life Gives You Lemmas, Make Lemma-nade! Y is a non-negative continuous random variable A lemma in the home or office is a good thing Probability Density Function: f Y ( y ) E [ Y ] P (


slide-1
SLIDE 1

1 The Questions of Our Time

  • Y is a non-negative continuous random variable
  • Probability Density Function: fY(y)
  • Already knew that:
  • But, did you know that:

?!?

  • No, I didn’t think so...
  • Analogously, in the discrete case, where X = 1, 2, …, n

dy y f y Y E

Y

  

 ) ( ] [ dy y Y P Y E

  ) ( ] [

 

n i

i X P X E

1

) ( ] [

Life Gives You Lemmas, Make Lemma-nade!

  • A lemma in the home or office is a good thing
  • Proof:

dy y Y P Y E

  ) ( ] [ dy y F

  )) ( 1 ( y ) (y F ] [Y E

  

     

  ) ( ) (

y y x Y y

dy dx x f dy y Y P y x ] [ ) ( ) ( Y E dx x f x dx x f dy

x Y x Y x y

          

  

    

Discrete Joint Mass Functions

  • For two discrete random variables X and Y, the

Joint Probability Mass Function is:

  • Marginal distributions:
  • Example: X = value of die D1, Y = value of die D2

) , ( ) , (

,

b Y a X P b a p

Y X

  

  

y Y X X

y a p a X P a p ) , ( ) ( ) (

,

  

x Y X Y

b x p b Y P b p ) , ( ) ( ) (

,

6 1 36 1

6 1 6 1 ,

) , 1 ( ) 1 (    

 

  y y Y X

y p X P

  • Consider households in Silicon Valley
  • A household has C computers: C = X Macs + Y PCs
  • Assume each computer equally likely to be Mac or PC

A Computer (or Three) in Every House

             3 32 . 2 28 . 1 24 . 16 . ) ( c c c c c C P

X Y 1 2 3 pY(y) 0.16 0.12 0.07 0.04 0.39 1 0.12 0.14 0.12 0.38 2 0.07 0.12 0.19 3 0.04 0.04 pX(x) 0.39 0.38 0.19 0.04 1.00

Marginal distributions

Continuous Joint Distribution Functions

  • For two continuous random variables X and Y, the

Joint Cumulative Probability Distribution is:

  • Marginal distributions:
  • Let’s look at one:

         b a b Y a X P b a F b a F

Y X

, where ) , ( ) , ( ) , (

,

) , ( ) , P( ) ( ) (

,

        a F Y a X a X P a F

Y X X

) , ( ) , P( ) ( ) (

,

b F b Y X b Y P b F

Y X Y

       

Joint

  • This is a joint
  • A joint is not a mathematician
  • It did not start doing mathematics at an early age
  • It is not the reason we have “joint distributions”
  • And, no, Charlie Sheen does not look like a joint
  • But he does have them…
  • He also has joint custody of his children with Denise Richards
slide-2
SLIDE 2

2 Computing Joint Probabilities

  • Let FX,Y(x, y) be joint CDF for X and Y

) ) , (( 1 ) , P(

c

b Y a X P b Y a X       ) , ( ) ( ) ( 1

,

b a F b F a F

Y X Y X

    ) ) ( ) (( 1

c c

b Y a X P      )) ( ) (( 1 b Y a X P      )) , ( ) ( ) ( ( 1 b Y a X P b Y P a X P         ) , ( ) , ( ) , ( ) , ( ) , ( P

1 2 1 1 2 1 2 2 2 1 2 1

b a F b a F b a F b a F b Y b a X a        

1

a

2

a

2

b

1

b

  • Random variables X and Y, are Jointly

Continuous if there exists PDF fX,Y(x, y) defined

  • ver – < x, y <  such that:
  • Cumulative Density Function (CDF):
  • Marginal density functions:

Jointly Continuous

 

    

2 1 2 1

) , ( ) , ( P

, 2 1 2 1 a a b b Y X

dx dy y x f b Y b a X a

 

   

a b Y X Y X

dx dy y x f b a F ) , ( ) , (

, ,

) , ( ) , (

, 2 ,

b a F b a f

Y X Y X

b a   

  

 dy y a f a f

Y X X

) , ( ) (

,

  

 dx b x f b f

Y X Y

) , ( ) (

,

Imperfection on a Disk

  • Disk surface is a circle of radius R
  • A single point imperfection uniformly distributed on disk
  • Distance to origin: ,

               x,y R y x R y x y x f

R

Y X

where if if ) , (

2 2 2 2 2 2 2 ,

1 

2 2 2 2 2 ,

2

2 2 2 2 2 2 2

1 1 ) , ( ) (

R x R

x R x R y R y x Y X X

dy R dy R dy y x f x f

 

   

  

        

symmetry by , where 2

2 2 2

) (

R y R R y R

y fY

   

2 2

Y X D  

2 2 2 2

) (

R a R a

a D P   

  3 2 3

2 3 2 2

) 1 ( ) ( ] [

R R R a R a

a da da a D P D E

R R

           

 

Welcome Back the Multinomial!

  • Multinomial distribution
  • n independent trials of experiment performed
  • Each trial results in one of m outcomes, with

respective probabilities: p1, p2, …, pm where

  • Xi = number of trials with outcome i

where and

m i i

p

1

1

m

c m c c m m m

p p p c c c n c X c X c X P ... ,..., , ) ,..., , (

2 1

2 1 2 1 2 2 1 1

            n c

m i i 

1

! ! ! ! ,..., ,

2

1 2 1 m m

c c c n c c c n            

Hello Die Rolls, My Old Friend…

  • 6-sided die is rolled 7 times
  • Roll results: 1 one, 1 two, 0 three, 2 four, 0 five, 3 six
  • This is generalization of Binomial distribution
  • Binomial: each trial had 2 possible outcomes
  • Multinomial: each trial has m possible outcomes

7 3 2 1 1 6 5 4 3 2 1

6 1 420 6 1 6 1 6 1 6 1 6 1 6 1 ! 3 ! ! 2 ! ! 1 ! 1 ! 7 ) 3 , , 2 , , 1 , 1 (                                                   X X X X X X P

Probabilistic Text Analysis

  • Ignoring order of words, what is probability of any

given word you write in English?

  • P(word = “the”) > P(word = “transatlantic”)
  • P(word = “Stanford”) > P(word = “Cal”)
  • Probability of each word is just multinomial distribution
  • What about probability of those same words in

someone else’s writing?

  • P(word = “probability” | writer = you) >

P(word = “probability” | writer = non-CS109 student)

  • After estimating P(word | writer) from known writings,

use Bayes Theorem to determine P(writer | word) for new writings!

slide-3
SLIDE 3

3 Old and New Analysis

  • Authorship of “Federalist Papers”
  • 85 essays advocating ratification of

US constitution

  • Written under pseudonym “Publius”
  • Really, Alexander Hamilton, James

Madison and John Jay

  • Who wrote which essays?
  • Analyzed probability of words in each

essay versus word distributions from known writings of three authors

  • Filtering Spam
  • P(word = “Viagra” | writer = you)

<< P(word = “Viagra” | writer = spammer)