Presentation is loading. Please wait.

Presentation is loading. Please wait.

Expected Value (Mean), Variance, Independence Transformations of Random Variables Last Time:

Similar presentations


Presentation on theme: "Expected Value (Mean), Variance, Independence Transformations of Random Variables Last Time:"— Presentation transcript:

1 Expected Value (Mean), Variance, Independence Transformations of Random Variables Last Time:

2 Law of Large Numbers

3 Expected value of X is 3.5

4 Expected Value of a RV A measure of the center of the distribution Note: The expected value need not be an event Example: The expected value of a die is 1(1/6)+2(1/6)+3(1/6)+4(1/6)+5(1/6)+6(1/6) = 21/6 = 3.5 which is not a possible outcome (of a die roll)

5 Example: One Coin Toss, No Crying “We’ll toss a coin once. If it is heads, you get $10 million. If it is tails, you’ll have to pay me $1 million”

6 Example: One Coin Toss, No Crying “We’ll toss a coin once. If it is heads, you get $10 million. If it is tails, you’ll have to pay me $1 million” How much do you expect to get after the coin toss? 50% chance for $10 million 50% chance for -$1 million $4.5 million on average Recall: X denotes the change in your net value (in millions of dollars) after the coin toss. So, the expected value of X is  X = (-1) ·P(X= -1) + (10) ·P(X= 10) = (-1) · (.5) + (10) · (.5) = -.5 + 5 = 4.5

7 Example: One Coin Toss, No Crying “We’ll toss a coin once. If it is heads, you get $10 million. If it is tails, you’ll have to pay me $1 million” 4.500.000 = (.5)(-1.000.000) + (.5)(10.000.000)

8 Fair Games: Fair Game: Expected Value of Zero, i.e., you `expect’ to neither win nor lose (on average)

9 Example: One Coin Toss, No Crying “We’ll toss a coin once. If it is heads, you get $10 million. If it is tails, you’ll have to pay me $1 million” 4.500.000 = (.5)(-1.000.000) + (.5)(10.000.000) This game is better than fair! But… VERY risky!!

10 Variance of a RV A measure of the spread of the distribution (Some people, e.g., on Wall Street, use this as a measure of risk)

11 Standard Deviation of a RV A measure of the spread of the distribution in original units

12 E(X) +/-.5 +/- 1.5 +/- 2.5 Deviations from E(X): Understanding the variance of a die Variance of X is 2.91

13 Puzzle: for general functions g Sorry! No simple formula for general functions g!

14 Formulae for the linear case: g(x) = ax+b

15 Formulae for linear functions in two variables

16 Joint Random Variables. wrapping up some loose ends with probability and random variables e.g. Bayes’ Theorem Today:

17 JOINTLY DISTRIBUTED RANDOM VARIABLES values of two (or more) random variables might be interrelated Examples: (X,Y) = (height, weight) (person) (X,Y) = (ft. 2, # bedrooms) (house) (X,Y) = (risk, return) (investment) (X,Y) = (Homework Score, Exam 1 Score) (X,Y) = (Amount of sleep before exam, Score on Exam)

18 JOINTLY DISTRIBUTED RANDOM VARIABLES assigning two (or more) numerical values to each outcome Joint distribution of X and Y: Discrete case: for each pair of values (x,y) have to specify Joint probability: P(X=x,Y=y)  Note: P(X=x,Y=y) = P({X=x}  {Y=y})  Note: Continuous case: for each pair of values (x,y) have to specify Joint density: f(x,y)

19 MARGINAL PROBABILITIES (discrete case) How to calculate the probability distribution of X (or of Y) from the joint probability distribution: Marginal probability for any value x 0 of X is: Marginal probability for any value y 0 of Y is:

20 CONDITIONAL PROBABILITY (nothing new)

21 INDEPENDENCE OF RANDOM VARIABLES Recall: events A and B are independent if any of the following holds: P(A  B)=P(A)·P(B) P(A|B)=P(A) P(B|A)=P(B) Random variables X and Y are independent if, for all possible values x of X and y of Y, events {X=x} and {Y=y} are independent In other words, X and Y are independent if and only if for all x and y: P(X=x,Y=y) = P(X=x) ·P(Y=y)

22 INDEPENDENT RANDOM VARIABLES X and Y are independent if and only if for all x and y: P(X=x,Y=y) = P(X=x) ·P(Y=y) Good news: If X and Y are independent then:

23 REMEMBER: INDEPENDENCE Two events are independent if the information about one of them occurring (or not occurring) does not change the probability of the other one. In other words, A and B are independent if P(A|B) = P(A) How to recognize independent events? A and B are independent if any of the following is true: P(A|B)=P(A) P(B|A)=P(B) P(A  B)=P(A)·P(B) (If any of the above equalities is true, then all three are true)

24 Let’s take a deck of cards and draw a (single) card (just once) at random from the deck. The sample space S is the set of all cards. Let A be the set of jacks, i.e., the event that I draw a jack Let B be the set of face cards, i.e., the event that I draw a face card. P(A) P(B) If A occurs, what is the (conditional) probability that B occurs? If B occurs, what is the (conditional) probability that A occurs? Are the events A,B independent? = 1/13 = 3/13 = 1 =1/3 No

25 Let’s take a deck of cards and draw a (single) card (just once) at random from the deck. The sample space S is the set of all cards. Let A be the set of red cards, i.e., the event that I draw a red card Let B be the set of face cards, i.e., the event that I draw a face card. P(A) P(B) If A occurs, what is the (conditional) probability that B occurs? If B occurs, what is the (conditional) probability that A occurs? Are the events A, B independent? = 1/2 = 3/13 =1/2 Yes.

26 REMEMBER: THE UNION of events A and B is the event consisting of all outcomes that are in A or B (or both). Notation: A  B (book notation: A or B) A union B P(A  B) = P(A) + P(B) - P(A  B) A B A B

27 THE UNION OF DISJOINT (MUTUALLY EXCLUSIVE) EVENTS P(A  B) = P(A) + P(B) - P(A  B) A B A B Here: P(A  B) = P(A) + P(B) - 0 Here: P(A  B  C ) = P(A) + P(B) + P(C)

28 Some Rules of Probability

29 More formulae: P(B|A) = = Thus, P(B|A) is not the same as P(A|B). P(A  B) = P(A|B)·P(B) P(A  B) = P(B|A)·P(A) CONDITIONAL PROBABILITY

30 AIDS Testing Example  ELISA test: + : HIV positive - : HIV negative Correctness: 99% on HIV positive person (1% false negative) 95% on HIV negative person (5% false alarm)  Mandatory ELISA testing for people applying for marriage licenses in MA. “low risk” population: 1 in 500 HIV positive  Suppose a person got ELISA = +. Q: HIV positive?

31 What we know:

32 P(HIV  +) = P(+ | HIV) P(HIV) = (.99) (.002) =.00198 P(+) = P(+  HIV) + P(+  noHIV) = P(+ | HIV) P(HIV) + P(+ | noHIV) P(noHIV) =.00198 + (.05)(.998) =.00198 +.0499 =.05188

33 The probability that a person with a positive ELISA test result actually has the HIV anti-bodies is less than 4%

34 Number of People with HIV and positive result Number of People with false positive result

35 Conclusion: False Positive overwhelms Correct Positive Lesson to learn: When it comes to conditional probabilities on rare events (with updated information) do not trust your intuition. Conditional Probabilities can be counter-intuitive

36 AIDS Testing Sensitivity Analysis (Relax, this is just for illustration.)

37

38

39

40

41

42

43

44

45

46

47

48 Enough Fun! It’s time to work! Example:A is HIV B is + P(A) = 1/500 P(B | A) =.99 P(B | notA) =.05

49 Bayes’ Theorem …some people make a living out of this formula Try Michael Birnbaum’s (former UIUC psych faculty) Bayesian calculator http://psych.fullerton.edu/mbirnbaum/bayes/BayesCalc.htm

50 Bayes’ Theorem

51 Let’s take a deck of cards and draw a (single) card (just once) at random from the deck. The sample space S is the set of all cards. Let A be the set of jacks, i.e., the event that I draw a jack Let B be the set of face cards, i.e., the event that I draw a face card. P(A|B) = 1/3 P(B|A) = 1

52 An Excursion into Logic… If you are an undergraduate major in Psychology at UIUC, then you have to complete a course requirement in Statistics. “If p, then q” therefore “If not q, then not p” Contrapositive

53 An Excursion into Logic… If you don’t have to complete a course requirement in Statistics, then you are not an undergraduate major in Psychology at UIUC. “If p, then q” therefore “If not q, then not p” Contrapositive

54 An Excursion into Logic… If you are not an undergraduate major in Psychology at UIUC, then you do not have to complete a course requirement in Statistics. “If p, then q” does not imply “if not p, then not q” FALLACY!! (denying the antecedent)

55 An Excursion into Logic… If you have to complete a course requirement in Statistics then you are an undergraduate major in Psychology at UIUC. “If p, then q” does not imply “If q, then p” FALLACY!! (affirming the consequent)

56 Probabilistic Reasoning…


Download ppt "Expected Value (Mean), Variance, Independence Transformations of Random Variables Last Time:"

Similar presentations


Ads by Google