03. random variable

18
1 Probabilit 03. Random Variable Probability Mass Function Expectation 郭郭郭 2009/03/16

Upload: astro

Post on 02-Feb-2016

53 views

Category:

Documents


0 download

DESCRIPTION

Probability Mass Function Expectation 郭俊利 2009/03/16. 03. Random Variable. 1.7 ~ 2.6. Outline. Review Conditional probability Random variable PMF Conditional PMF. Example 1. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 03. Random Variable

1

Probability

03. Random Variable

Probability Mass FunctionExpectation

郭俊利 2009/03/16

Page 2: 03. Random Variable

2

ProbabilityOutline

Review Conditional probability

Random variable PMF Conditional PMF

1.7 ~ 2.6

Page 3: 03. Random Variable

3

ProbabilityExample 1

From the set of integers {1, 2, 3,. . . , 100000} a number is selected at random. What is the probability that the sum of its digits is 11?

All – (a digit over 11) – (a digit over 10)

= H511 – C5

1 – C52 2!

Page 4: 03. Random Variable

4

ProbabilityExample 2

First throw an unbiased die, then throw as many unbiased coins as the point shown on the die. What is the probability of obtaining k

heads? If 3 heads are obtained, what is the

probability that the die showed n?

Page 5: 03. Random Variable

5

ProbabilityRandom Variable

The random variable is a real-valued function of the outcome of the experiment. Discrete General = Continuous

1 2 3 4 … 7 … 11 1236

654321

The sum of two dices is x,what is p(x) ?p(x) is uniform ?

x

p(x) (a)

(b)

Page 6: 03. Random Variable

6

ProbabilityExpected Value (1/2)

Example: The expectation of throwing a dice is

3.5 The answer to a question is 80%

correctly, the grade may be 80.

Expectation E[X] = Σ x pX(x)p(x) > 0

x X ∈upperlowerlower

upper

Page 7: 03. Random Variable

7

ProbabilityExpected Value (2/2)

E[a] = a E[aX] = aE[x] E[aX + b] = aE[x] + b E[g(X)] = Σ g(x) px(x) E[X] = Σ E[Xi] = np (p is uniform!)

i = 1 ~ n

Page 8: 03. Random Variable

8

ProbabilityExample 3

The shooting average of A is 2/3The shooting average of B is 3/4The shooting average of C is 4/5

(1) P (at least one hit) =

(2) P (one hit) = P (two hits) = P (three hits) =

(3) (A hit | one hit) =

(4) E (how many hits) =

Page 9: 03. Random Variable

9

ProbabilityPMF

Probability Mass Function

X = 1, if a head, 0, if a tail.

Its PMF is

pX(k) = p, if k = 1, 1 – p, if k = 0.

{

{

Page 10: 03. Random Variable

10

ProbabilityExample 4

Let X be a random variable that takes values from 0 to 9 equal likely.(1) Find the PMF of Y = X mod 3(2) Find the PMF of Z = 5 mod X+1

A family has 5 natural children and has adopted 2 girls. Find the PMF of the number of girls out of the 7 children.

Page 11: 03. Random Variable

11

ProbabilityExample 5 (variance)

(1) Find a and E[X].(2) What is the PMF of Z = (X – E[X])2?(3) From above, find the variance of X.(4) var(X) = Σx (x – E[X])2 pX(x).

p(x) = x2 / a, if |x| < 4 and x Z∈ 0, otherwise.{

Page 12: 03. Random Variable

12

ProbabilityImportant PMF

Bernoulli pX(k) = p, 1-p

Binomial pX(k) = Cn

k pk (1 – p)n – k

Geometric pX(k) = pk (1 – p)n – k

Poisson pX(k) = e–λλk / k!

e = 2.7183…

Page 13: 03. Random Variable

13

ProbabilityPoisson

Poisson is a good model for Binomial When p is very very very small

and n is very very very large, then

λ = np The probability of a wrong words is 0.1% and th

ere are 1000 words in the document, what is the probability of 5 words found?

C100050.0015(0.999)95 e≒ –1 15

5!

Page 14: 03. Random Variable

14

ProbabilityJoint PMF

Joint PMF pX, Y(x, y) = P(X = x, Y = y)

Marginal PMFpX(x) = Σy pX, Y(x, y)pY(y) = Σx pX, Y(x, y)

Example pX, Y(x, y) = 1 / 52

pX(x) = 13 = 1 / 41

52

Page 15: 03. Random Variable

15

ProbabilityExample 6

X: –3 < x < 5Y: –2 < y – x < 2

Joint PMF pX, Y(x, y) =

Marginal PMFpX(x) =pY(y) =

The averages of X and Y

Question

X and Y Z∈

Page 16: 03. Random Variable

16

ProbabilityExample 7

A perfect coin is tossed n times. Let Yn denote the number of heads obtained minus the number of tails. Find the probability distribution of Yn and its mean.

Page 17: 03. Random Variable

17

ProbabilityConditional PMF

pX|A (x) = P(X = x | A) pX(x) = Σi P(Ai) pX|Ai (x) pX, Y(x, y) = pY(y) pX|Y (x|y)

E[X] = Σi P(Ai) E[X | Ai]

Page 18: 03. Random Variable

18

ProbabilityExample 8

You maybe ask 0, 1 or 2 questions equal likely, I answer 75% correctly. X: the number of questions; Y: the number of wrong answers. Constructing joint PMF pX, Y(x, y) to find the probability of…

One question is asked and is answered wrong. At least one wrong answer.