1 / 18

03. Random Variable

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.

astro
Download Presentation

03. Random Variable

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Probability Mass Function Expectation 郭俊利2009/03/16 03. Random Variable

  2. 1.7 ~ 2.6 Outline • Review • Conditional probability • Random variable • PMF • Conditional PMF

  3. Example 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 – C51 – C52 2!

  4. Example 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?

  5. 36 Random Variable • The random variable is a real-valued function of the outcome of the experiment. Discrete General = Continuous p(x) (a) (b) 6 5 4 3 2 1 The sum of two dices is x, what is p(x) ? p(x) is uniform ? x 1 2 3 4 … 7 … 11 12

  6. upper upper lower lower Expected 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

  7. Expected 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

  8. Example 3 • The shooting average of A is 2/3 The shooting average of B is 3/4 The 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) =

  9. PMF • 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. {

  10. Example 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.

  11. Example 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.

  12. Important PMF • Bernoulli • pX(k) = p, 1-p • Binomial • pX(k) = Cnk pk (1 – p)n – k • Geometric • pX(k) = pk (1 – p)n – k • Poisson • pX(k) = e–λλk / k! • e = 2.7183…

  13. 15 5! Poisson • Poisson is a good model for Binomial • When p is very veryvery small and n is veryvery very large, then λ = np • The probability of a wrong words is 0.1% and there are 1000 words in the document, what is the probability of 5 words found? C100050.0015(0.999)95 ≒ e–1

  14. 1 52 Joint PMF • Joint PMF • pX, Y(x, y) = P(X = x, Y = y) • Marginal PMF pX(x) = Σy pX, Y(x, y) pY(y) = Σx pX, Y(x, y) • Example • pX, Y(x, y) = 1 / 52 pX(x) = 13 = 1 / 4

  15. Example 6 X: –3 < x < 5 Y: –2 < y – x < 2 • Joint PMF • pX, Y(x, y) = • Marginal PMF pX(x) = pY(y) = • The averages of X and Y Question X and Y ∈ Z

  16. Example 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.

  17. Conditional 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]

  18. Example 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.

More Related