Statistics for Business and Economics: Random Variables (1) STT 315: Section 201 Instructor: Abdhi Sarkar Acknowledgement: I’d like to thank Dr. Ashoke Sinha for allowing me to use and edit the slides. Random Variable • A random variable is a numerical variable, values of which are associated to outcome(s) of some random experiment. • This means that the values of random variable depends on chance. • We usually denote them by capital letters like X, Y, Z etc. Example: • Suppose you toss a fair coin twice. • Let X = the number of heads out of these two tosses. • Then X is a variable which takes the values 0, 1, 2 but the value depends on the outcome of two tosses, which is a random event. • Therefore, X is a random variable. 2 Two Types of Random Variables • Discrete Random Variable: These random variables can assume countable number of values. (e.g. – number of heads out of two tosses of a fair coin – this random variable can only take values 0, 1, 2.) • Continuous Random Variables: These random variables can assume any value contained in one or more intervals. (e.g. – total amount of rainfall (in inches) in East Lansing in 2011.) We first discuss some discrete random variables, and consider some continuous random variables later. 3 Probability distributions of discrete random variables 4 Example • X = number of heads in two tosses of a fair coin. • X takes values 0, 1, 2. Outcome of the tosses TT TH HT HH Value of X 0 1 1 2 Probability ¼ ¼ ¼ ¼ So, P(X=0) = ¼ , P(X=1) = ¼+¼ = ½ , P(X=2) = ¼. We denote p(x) = P(X=x). x p(x) 0 1 ¼ ½ 2 ¼ 5 Probability distribution function Consider a discrete random variable X and define the function: = = . is called the probability distribution function of X. satisfies the following two properties: 1. 0 ≤ ( ) ≤ 1, for any real number . 2. ∑ = 1. 6 Another Example • X = number of tails in three tosses of a fair coin. • X takes values 0, 1, 2, 3. Outcome of the tosses HHH HHT HTH THH HTT THT Value of X 0 1 1 1 2 2 Probability ⅛ ⅛ ⅛ ⅛ ⅛ ⅛ TTH TTT 2 3 ⅛ ⅛ 7 Another Example Hence • P(X=0) = ⅛, • P(X=1) = ⅛ + ⅛+ ⅛ = ⅜, • P(X=2) = ⅛ + ⅛+ ⅛ = ⅜, and • P(X=3) = ⅛. x p(x) 0 ⅛ ⅜ ⅜ ⅛ 1 2 3 8 Insurance Example • Suppose the death rate in a year is 1 out of every 1000 people, and another 2 out of 1000 suffer some kind of disability. Suppose that an insurance company has to pay $10000 for death and $5000 for disability. • Define X = amount (in dollars) the insurance company has to pay for one policyholder in a year. • X takes values 10000, 5000, 0. Policyholder Outcome Payout (x) Death 10000 1/1000 = 0.001 5000 2/1000 = 0.002 0 1-(0.001+0.002) = 0.997 Disability Neither Probability p(x) 9 Expected Value • For a discrete random variable X, the expected value of X (or expectation of X) is defined as the sum of the terms value times probability. =∑ = sum over (value × probability). Suppose X takes values x1, x2,…, xn with probabilities p(x1), p(x2),…, p(xn) respectively. Then = + + ⋯+ . • Often E(X) is also called mean of random variable X, and is denoted by Greek letter µ. • Roughly speaking, E(X) denotes the value you can expect X to take on the average. 10 Insurance Example (revisited) • Suppose the death rate in a year is 1 out of every 1000 people, and another 2 out of 1000 suffer some kind of disability. Suppose that an insurance company has to pay $10000 for death and $5000 for disability. • Define X = amount (in dollars) the insurance company has to pay for one policyholder in a year. • Then E(X) is computed as follows: Policyholder Outcome Death Disability Neither Payout (x) Probability p(x) 10000 0.001 10000 × 0.001 = 10 5000 0.002 5000 × 0.002 = 10 0 0.997 0 × 0.997 = 0 xp(x) [Summing] E(X) = 20 11 Tossing Coin Thrice Example (revisited) • X = number of tails in three tosses of a fair coin. • Then E(X) is computed as follows: x 0 1 2 3 p(x) ⅛ ⅜ ⅜ ⅛ xp(x) 0×⅛=0 1 × ⅜ = 0.375 2 × ⅜ = 0.75 3 × ⅛ = 0.375 E(X) = 1.5 On the average, you can expect 1.5 tails out of 3 tosses of a fair coin. 12 Variance and Standard Deviation • Variance of a random variable X is defined by = ( )= − ( ). • Standard deviation of X is the square-root of the variance of X = = ( ). • If many random variables are involved we may write to identify. ( ) or • Variance has the square unit of the random variable, whereas the standard deviation has the same unit as the random variable. 13 Tossing Coin Thrice Example (revisited) • X = number of tails in three tosses of a fair coin. • Then var(X) is computed as follows: x 0 1 2 3 p(x) ⅛ ⅜ ⅜ ⅛ xp(x) 0×⅛=0 1 × ⅜ = 0.375 2 × ⅜ = 0.75 3 × ⅛ = 0.375 µ=E(X) = 1.5 [x – µ]2p(x) (0-1.5)2 × ⅛ = 0.28125 (1-1.5)2 × ⅜ = 0.09375 (2-1.5)2 × ⅜ = 0.09375 (3-1.5)2 × ⅛ = 0.28125 σ2 = 0.75 Standard deviation: σ = √0.75 = 0.866. 14 TI 83/84 Plus commands We can use TI 83/84 to compute mean and standard deviation of a discrete random variable. • Press [STAT]. Under EDIT select 1: Edit and press ENTER. • Columns with names L1, L2 etc. will appear. • Type the values of random variable X under the column L1 and the values of p(x) under the column L2 . • Press [STAT] and choose CALC at the top. • Then select 1: 1-Var Stats and press ENTER and 1Var Stats will appear on the screen. Press [2nd] & 1 (to get L1), then press , (comma) and then press [2nd] & 2 (to get L2). Then press ENTER. • We shall be needing mean ( ̅ ), standard deviation (σx). 15 Properties: Expectation and Variance • Expectation is the center of the probability distribution of a random variable. • Variance and standard deviations are measures of spread of the probability distribution of a random variable. Larger the variance/standard deviation, larger the spread (or dispersion). • For any real numbers a and b a) b) +# = +# =| | + #. . • The Chebyshev and empirical rules are also valid involving mean µ and standard deviation σ. 16 An example: A Gambling Game • In a casino, you can play the following game: if you pay $10, the game-manager will toss a fair coin 3 times. You will earn $5 for every tail and nothing for the head(s). What is your expected profit/loss from this game? Is it wise to play this game over and over again? • Let X = the number of tails out of 3 tosses of a fair coin, and Y = your profit (in dollars) from this game. • Then you will pay $10 and make $5X, and therefore, Y = 5X - 10. = 1.5, = 0.866. • From our previous calculation: • Your expected profit: E(Y) = E(5X - 10) = 5E(X) - 10 = (5 × 1.5) - 10 = -2.5. • It is not wise to play this game because on the average, you are expected to lose $2.5 per game. 17 An example: A Gambling Game • In a casino, you can play the following game: if you pay $10, the game-manager will toss a fair coin 3 times. You will earn $5 for every tail and nothing for the head(s). What is the variance of your profit from this game? What is the standard deviation of your profit from this game? • As we have seen your profit (in dollars) from this game is Y = 5X - 10. Your expected profit: E(Y) = E(5X - 10) = 5E(X) - 10 = (5 × 1.5) - 10 = -2.5. • So standard deviation of your profit: σ(Y) = σ(5X - 10) = 5σ(X) = 5 × 0.866 = 4.33, and variance is σ2 (Y) = (4.33)2 = 18.75. 18
© Copyright 2026 Paperzz