1 / 33

Outline

Outline. Random processes Random variables Probability histograms Law of Large numbers. Random phenomenon. In random phenomena, the outcomes can occur with a certain probability, but we cannot predict which outcome will occur with certainty: Tossing a coin

tavia
Télécharger la présentation

Outline

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. Outline Random processes Random variables Probability histograms Law of Large numbers

  2. Random phenomenon In random phenomena, the outcomes can occur with a certain probability, but we cannot predict which outcome will occur with certainty: • Tossing a coin • Waiting less or longer than 5 minutes for the L • Blood type of a selected donor. • Number of users of an Internet application at a given time.

  3. Random phenomena can be represented in a mathematical framework by RANDOM VARIABLES For instance X = number of heads in 4 tosses of a coin. These are the possible outcomes: A probability value can be associated to each value of X.

  4. So if X=0, then no head comes up, so the probability is 1/16 If X=1, then only one head come up, the probability is _1/4__ If X=2, then 2 heads come up, the probability is _6/8__ If X=3, then 3 heads come up, the probability is _1/4__ If X=4, then 4 heads come up, the probability is _1/16__ The outcome of 4 tosses of a coin changes from time to time, so the value of X (number of heads in 4 tosses) will change accordingly.

  5. Chance 40 (%) 30 20 10 0 1 2 3 4 Probability Histograms for discrete variables The probability table associated to a random process or a random variable can be displayed as a probability histogram. For example the probability histogram of the number of heads in 4 tosses of a coin is displayed below: A probability histogram represents probabilities NOT data. The total area under the histogram is equal to 1

  6. Thus a random variable is a variable whose numerical values represent to the outcomes of a random phenomenon. A discrete random variable has probability distribution given below in the probability table With p1+p2+…pk =1

  7. Thus a random variable is a variable whose numerical outcomes are associated to the outcomes of a random phenomenon. A discrete random variable has probability distribution given below probability table The expected value is The standard deviation is

  8. Blockbuster rental X= number of videotapes rented by one customer from Blockbuster

  9. How do you compute the probability table of random variables? The law of large numbers A coin lands heads with probability =0.5 P(fair coin=heads)=0.5 If we toss a coin many times, say 1,000 times, we would expect to get 1,000/2 = 500 heads. This rarely happens in nature. We will most likely see, for example 503 heads, 498 heads, 510 heads or 490 heads. This is because of chance variability: “random” error = number of heads – half the number of tosses

  10. Example: For instance, in 1000 tosses we get 550 heads. The error = 500 – 550= 50 tosses (in absolute terms) But if we consider the percentages: the “random” error is 50/1000=0.05 or 5% of the number of tosses

  11. Number of heads minus half the number of tosses Number of Tosses Suppose 4 coins were tossed 1600 times each. The “random error” number of heads – half the number of tosses was plotted against the number of tosses • After 400 tosses of a coin, the chance errors for the four coins were: • 10 = 210 – 200  –8 = 192 – 200 • –12 = 188 – 200  3= 203 – 200 After 1600 tosses of a coin, the random errors for the four coins were: • 30 = 830 – 800  –26= 774 – 800  –14= 786 –800  8= 808 – 800

  12. Percentages of heads–50% Number of Tosses Suppose 4 coins are tossed 1600 times each. Here are the percentages of heads plotted against the number of tosses If a coin is tossed 400 times the percentage of heads is 50% give or take 4% If a coin is tossed 1600 times the percentage of heads is 50% give or take 2%

  13. The law of large numbers “The longer a random process is repeated under the same conditions, the closer the observed proportion of each outcome occurrence is to the actual probability of occurrence.” Casinos & insurance companies found their business on the law of large numbers! A convenient way of representing a random phenomenon is through a random variable. We can associate a variable to each random process. The values of such a variable are the possible outcomes of the random process.

  14. Percent 40 30 20 10 0 1 2 3 4 The law of large numbers: If the process is repeated many times, empirical histograms will converge to probability histograms. Suppose we toss 4 coins 20 times, 100 times and 1,000 times, and we count the number of heads. The empirical histograms below show the observed proportions of heads. In 20 repetitions In 100 repetitions 7/20 7/20 Percent 40 30 20 10 3/20 4/20 1/20 0 1 2 3 4 In 1,000 repetitions Probability histogram Percent 40 30 20 10 Chance 40 (%) 30 20 10 0 1 2 3 4 0 1 2 3 4

  15. Another example of random variable The probability of being able to log on to a certain computer from a remote terminal is 0.7. Let X be the number of attempts that must be made before gaining access to the computer. Suppose your dial-up connection tries up to 5 times. The random process is described by the following table: Probability Probability histogram 6 5 4 3 2 1 The value X=0 means that the connection is established at the first attempt, X= 5 means that there was no connection after 5 attempts. (Try to compute the probabilities in the table) 0 1 2 3 4 5

  16. The observed proportions of attempts to log on to a computer for 25 times, 500 times and 5,000 times are displayed below (Obtained from simulations). Proportion Proportion Histogram for 25 repetitions Histogram for 500 repetitions Histogram for 5,000 repetitions. It has converged to the probability histogram 0.6 0.5 0.4 0.3 0.2 0.1 0.6 0.5 0.4 0.3 0.2 0.1 Proportion 0.6 0.5 0.4 0.3 0.2 0.1 10/25 8/25 4/25 2/25 1/25 0/25 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5

  17. Expected value and standard deviation A random process is observed. It produces a number, then another and another… For instance consider the number of heads in 100 tosses. You might get 57, which is 7 heads above the expected value of 50 Toss a coin 100 times again, you might get 55, which is 5 heads above 50 Again… you might get 48, which is 2 heads below 50….and so on…. The numbers delivered by the process vary around the expected value, the amount off being similar in size to the standard deviation. Thus in 100 tosses the expected value for the number of heads is 50. The standard deviation is a measure of the chance error. We will now define these two quantities.

  18. The expected value The number of heads in 4 tosses of a coin would be a number around 2. In statistical terms: The expected value of the number of heads in 4 tosses of a coin is 2. It is calculated by multiplying each possible value by its probability, then adding all the products. Expected value of X= 0*0.0625+1*0.25+2*0.375+3*0.25+4*0.0625= = 0 + 0.25 + 0.75 +0.75 + 0.25 = 2

  19. Chance 40 (%) 30 20 10 0 1 2 3 4 Expected value and Probability Histogram The expected value is the mean (average) of the probability histogram. The expected value of the number of heads in 4 tosses of a coin is 2. X=2

  20. Average (expected) number of attempts 6 5 4 3 2 1 Probability histogram The expected value is computed by X= 0*0.7+1*0.21+2*0.63+3*0.0189+4*0.00567 +5*0.00243=1.56 0 1 2 3 4 5 X=1.56

  21. Expected value and expected payoff in gambling A game is fair if the expected value for the net gain equals 0: on the average players neither win or lose. Keno: In the game Keno, there are 80 balls, numbered 1 to 80. On each play, the casino chooses 20 balls at random. Suppose you bet $1 on 17 in each Keno play. When you win, the casino gives you your dollar back and 2 dollars more When you lose, the casino keeps your dollar. The bet pays 3 to 1. Is the bet fair? Create the random variable: The expected value of X is –1*0.75+3*0.25=0. The game is fair!

  22. American RouletteThe roulette wheel has 38 slots numbered 0,00, and 1 to 36. A straight bet: bet on a single number – pays 35 to 1. A color bet: bet either on red or black – pays 1 to 1 (lose if 0, 00 comes up) A 4-number bet : bet on the four numbers in a square – pays 8 to 1. These are just a few possible bets, what is the expected payoff? Which bet would you expect to pay better?

  23. A straight bet: bet on a single number – pays 35 to 1. The random variable X that represents the bet is the dollar amount. The expected payoff is the expected value μX=35*1/38+(–1)*37/38=–2/38=–0.0526 In the long run, you will lose 5 cents for each dollar you bet. A color bet: bet either on red or black – pays 1 to 1 (lose if 0, 00 comes up). The expected payoff is the expected value μX=1*18/38+(–1)*20/38=–2/38=–0.0526 In the long run, you will lose 5 cents for each dollar you bet.

  24. A measure of the random error: the standard deviation In 4 tosses, the number of heads might be 3, which is 1 heads above the expected value of 2, or 1 which is 1 heads below 2…and so on The number of heads in 4 tosses of a coin will be: number of heads X= expected value +chance error So if we observe 3 heads, the chance error is +1; if we observe 1 head, the chance error is –1. The chance error is measured by the standard deviation. The standard deviation is calculated

  25. The expected value is Step 3: sum the products: (0.25+0.25+0.25+0.25)=1 Step 4: Take the square root The standard deviation of X is sqrt(1)=1 The observed number of heads in 4 tosses of a coin is likely to be around 2, give or take 1.

  26. Chance 40 (%) 30 20 10 0 1 2 3 4 Standard deviation and probability histograms The standard deviation measures the spread of the probability histogram. The standard deviation of the number of heads in 4 tosses of a coin is 0.5. X–1s.e.=2 – 1=1 X+1s.e.=2+1=3 1 s.e. 1 s.e. X=2 Remark: Observed values are rarely more than 2 or 3 standard deviations away!!

  27. Standard deviation for number of attempts 6 5 4 3 2 1 Probability histogram The expected value is X= 1.56 X=1.56 0 1 2 3 4 5 The S.D. = [(0–1.56)2*0.7+(1–1.56)2*0.21+(2–1.56)2*0.063+….+(5–1.56)2*0.00243] = (1.70+0.066+0.012+0.039+0.034+0.029)= 1.37

  28. Standard deviations of bets for the American roulette. A straight bet: The expected payoff is the expected value μX =–0.0526 The standard deviation is =sqrt[(35–(–0.0526))2*1/38+ (–1+0.0526)2*37/38]=5.763 A color bet: The expected payoff is the expected value μX=– 0.0526 The standard deviation is =sqrt[(1–(–0.0526))2*18/38+ (–1+0.0526)2*20/38]=0.997

  29. Thus the three bets have the same expected payoffs, but different standard deviations. The straight bet has the highest standard deviation, it is the riskiest bet!! If you bet one dollar on the same number for many times, on average your gain will be a value in (μX–2S.D., μX+2S.D.), that is (-11.58$, 11.47$). You can lose or win up to 11 times your bet!! In the color bet, the standard deviation is small. If you bet one dollar on red for many times, on average your gain will be a value in (-2.047$, 1.94$). You can lose or win up to 2 times your bet! The standard deviation is measuring the risk in each bet!!!

  30. Remarks on random processes An observed value should be somewhere around the expected value; the difference is random error. The likely size of the random error is the standard deviation. Observed values are rarely two or three standard deviations away from the expected value. The standard deviation of random variables measures the random error. The standard deviation “makes more sense” if the probability histogram of the random variable is bell-shaped, (similar to the normal distribution).

  31. Repetitions of a process Suppose we play Keno 10 times. What is our expected payoff? In each game, the expected payoff is the expected value of X, X=0 and the standard deviation is 1.732. What’s the expected payoff after 10 games? The payoff is the sum of the money won or lost in ten games. The expected gain in 10 plays of Keno is just the expected value X of 1 game times 10. The expected payoff in 10 plays of Keno is 10*0=0. In 10 plays, players are expected neither to win or lose. The standard deviation of 10 plays of Keno is the standard deviation of 1 play times the square root of 10, that is, in 10 plays theS.E. is 1.732* 10 =5.48. In 10 plays the gambler’s expected gain is 0, give or take 5.48.

  32. Sum of random variables The betting problem is an example of a sum of random variables. In a game, the outcome of the random process is the (positive/negative) win X, the total win in 10 plays is the sum of the outcomes in each play. Consider a random process, represented by the random variable X with expected value X and standard deviation σX . Suppose the process is repeated under the same conditions n times, The sum of the outcomes X has Expected value: X* (total number of repetitions)=X* n Standard deviation:

  33. Example A coin is tossed 100 times, what is the expected number of heads? Let X be head in one toss of a coin. So The expected value of X is X= 1*0.5+0.5*0=0.5 and The standard deviation is sqrt{(1-0.5)2*0.5+(0-0.5)2*0.5}=0.5 In n=100 times the expected number of heads is X*n=0.5*100=50 With standard deviation equal to 0.5*sqrt(100) = 5 Notice that the standard deviation increases with the number of tosses (repetitions of the process).

More Related