1 / 28

Statistics Lecture 13: Probability Distribution Functions and Random Variables

This lecture covers the concepts of probability distribution functions, random variables, and the gambler's fallacy. It also discusses calculations and interpretations of expected values.

dianab
Télécharger la présentation

Statistics Lecture 13: Probability Distribution Functions and Random Variables

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. Statistics 200 Objectives: • Identify, and resist the temptation to fall for, the “gambler’s fallacy” • Define “random variable” and identify the difference between discrete and continuous. • Use and recognize probability distribution functions (for discrete) or density functions (for continuous) • Calculate and interpret the expected value of a discrete random variable. Lecture #13Tuesday, October 4, 2016 Textbook: Sections 7.3, 7.4, 8.1, 8.2, 8.3

  2. Confusion of the inverse Suppose that a particular disease affects 1% of those who get tested for it. Also suppose that the test is 98% accurate. What would you advise a patient who tests positive if the test result were the only piece of information? True probability of disease given this information : about 33% Confusion between P(disease present given positive test) and P(positive test given disease present)

  3. Cancer testing: confusion of the inverse Suppose we have a cancer test for a certain type of cancer. Sensitivity of the test: If you have cancer then the probability of a positive test is .98. Pr(+ given you have C) = .98 Specificity of the test: If you do not have cancer then the probability of a negative test is .98. Pr(– given you do not have C) = .98 Base rate: The percent of the population who has the cancer. This is the probability that someone has C. Suppose for our example it is 1%. Hence, Pr(C) = .01.

  4. Table of proportions (given): Hypothetical table of counts: Pr(C given a positive test result) = 98/296 = 33.1%

  5. Gambler’s fallacy • Long-term probabilities should apply in the short term (false!) • Random events should be “self-correcting” (false!) Example: a gambler who loses 48 times at a slot machine thinks that he is about to win, since he knows the slot machine pays big 1 in every 50 times in the long run.

  6. Law of large numbers (this is true!) If an event is repeated many times independently with the same probability of success each time, the long-run success proportion will approach that probability. • With independent events, knowing what has happened tells you nothing about what will happen. Misunderstanding this leads to the gambler’s fallacy, also known as: The “law of small numbers” (not a real thing), which is that small samples will always be representative of the population from which they are drawn.

  7. More on Gambler’s Fallacy Suppose you flip four coins, keeping track of the results in order. • Which is more likely, HHHH or HTTH? • Which is more likely, four total heads or two total heads? Note: These questions are not the same! One of these questions is often mistakenly answered due to belief in the "Law of small numbers" (also known as the Gambler's Fallacy).

  8. More probability review Suppose that you roll a fair 6-sided die until the first occurrence of a 4. What is the probability that the first 4 occurs on the third roll? • 1/6 • 5/6 • (5/6) × (5/6) × (1/6) • (1/6) × (1/6) × (1/6) • (1/6) + (1/6) + (1/6)

  9. Still more probability review Consider the diagram. Which number should go in the “??” Box? A. 1.0 B. 0.2 C. 0.1 D. 0.9 B A ?? .4 .1 .3

  10. What is a random variable? A random variable is a rule for assigning a numerical value to each outcome of a probability experiment. Example: The number of heads that appear if I toss a nickel, a dime, and a quarter.

  11. Capital letters like X or Y denote random variables Let X = number of heads X = 3 X = 0 X = 1 X = 2 X = 2 X = 2 X = 1 X = 1 Later, we’ll assign a probability to each possible value of X.

  12. Examples: Discrete Random Variables Possible values of X Flip 3 coins X= # heads 0, 1, 2, 3 2, 3, …, 11, 12 Roll 2 dice X= sum of dots Survive Monday X= # cups of coffee 0, 1, 2, …, 10, …

  13. Discrete Random Variables Discrete list of distinct values. Typically used when a variable is integer-valued without too many possible choices. choices pdf (Probability distribution function) For example: P(X = 2) = 0.278 If X is the sum of two fair dice when rolled.

  14. Examples: Continuous Random Variables Possible values of X Catch the R bus X= time waiting Between 0 and 20, ideally Weigh male firefighter X= his weight Between 150 and 250 Run obstacle course X= time to finish 0 to infinity?

  15. Continuous Random Variable Assumes a range of values covering an interval. _____________. May be limited by instrument’saccuracy / decimal points, but still continuous. Find probabilities using a probability density function, which is a curve. Calculate probabilities by finding the area under the curve. is this area • We can’t find probabilities for exact outcomes. • For example: P(X = 2) = 0. • Instead we can find probabilities for a range of values.

  16. Coin example: build pdf for X = # heads from 3 coin tosses 1

  17. Coin example: build pdf for X = # heads from 3 coin tosses 1 3

  18. Coin example: build pdf for X = # heads from 3 coin tosses 1 3 3

  19. Coin example: build pdf for X = # heads from 3 coin tosses 1 3 3 1

  20. Example 2: An example of a probability distribution function (pdf) • Let X = number of courses per semester taught by PSU faculty Why is this table a pdf?

  21. X = number of courses/semester taught by PSU faculty What isthe probability that X is: • exactly 2 classes? • at most 2 classes? • at least 1 class? • more than 1 class? Note: need to be careful at the borders

  22. X = number of courses/semester taught by PSU faculty What isthe probability that X is: • exactly 2 classes? • at most 2 classes? • at least 1 class? • more than 1 class? Note: need to be careful at the borders

  23. X = number of courses/semester taught by PSU faculty What isthe probability that X is: • exactly 2 classes? • at most 2 classes? • at least 1 class? • more than 1 class? Note: need to be careful at the borders

  24. X = number of courses/semester taught by PSU faculty What isthe probability that X is: • exactly 2 classes? • at most 2 classes? • at least 1 class? • more than 1 class? Note: need to be careful at the borders

  25. Section 8.3: Expected Value for Any Discrete Random Variable Expected Value of X Average value in the long run. notation µ:`mu’ In other words, mean from an imagined infinite number of observations. When calculated using a pdf: a weighted average

  26. Expected Value = Sum of “value × probability” over all possible values Faculty Example: Calculate the Expected Value E(X) • E(X) = µ = Interpretation: • The average is 1.7 classes for this population X = # courses/semester taught by PSU faculty 0×(.1) + 1×(.3) + 2×(.4) + 3×(.2) = 1.7

  27. Expected Value Application 0.01 100 Win 0.99 -5 Lose 1.00 (100)×(.01) + (–5)×(.99) E(X) = • Probability that Mary wins a game is 0.01. • If she wins: gets $100 • If she loses: pays $5. • X = the amount of money Mary will gain = 1 – 4.95 Questions: • Variable X is: discrete continuous • Setup pdf • What is the expected gain for Mary? = –3.95

  28. If you understand today’s lecture… 8.1, 8.7, 8.9, 8.15ab, 8.17, 8.21, 8.25, 8.29, 8.33, 8.37 Objectives: • Identify, and resist the temptation to fall for, the “gambler’s fallacy” • Define “random variable” and identify the difference between discrete and continuous. • Use and recognize probability distribution functions (for discrete) or density functions (for continuous) • Calculate and interpret the expected value of a discrete random variable.

More Related