4.1 Random Variables


Previously we have looked only at the outcomes of events. Now we will be broadening our scope. We will be examining not only the outcomes of particular events, but also the number of times those events occurred, and even how many attempts it takes before a particular events occurs.


Consider the outcomes of the roll of a 20-sided die. Previously we would need to define an event for each outcome (1 through 20). This is much too cumbersome. Now we will a single variable that may represent all outcomes of the die roll. This is called a Random Variable.


Defn: We represent the set of possible outcomes of a probability experiment by a Random Variable, denoted X. We represent the probability of a particular outcome, x , as P(X=x) or P(x).


Example: Rolling a six sided die. Let the random variable X represent the possible outcomes of the die roll. The possible outcomes are the values 1 through 6. So we may represent the probability of the roll being a three can by:

P(X=3) = 1/6 or P(3) = 1/6

This would then be read aloud as: “The probability of rolling a three is one sixth.”


Note: We must always define the random variable. Otherwise the statement P(X=3) would be meaningless.


Example: Consider measuring someone’s height. We define our random variable X to be the height measured in cm. The values X can take range from (0 to ∞). We can write the probability that the height measure is 179.4cm as:

P(X = 179.4) =______ or P(179.4) =_______


What is the difference between the numbers of possible outcomes in the two previous examples?


Defn: A random variable that can take on any value in some range is called a continuous random variable. Consider, for instance the example above of measuring height. The outcomes are any positive value.


Defn: A random variable that is not a continuous random variable is said to be a discrete random variable. Note the number of different outcomes can be either finite or infinite.


Example: Let X be the number of times flipping a coin before a heads occurs. Here there are an infinite number of outcomes. However we cannot have X= 1½ , so X is discrete.


Example: Let X be the roll of a 6-sided die. Since there are a finite number of outcomes, X is a discrete random variable.

Exercise: Classify the following random variables as either discrete or continuous

a) The number of phone calls made by a salesperson (ans: discrete)

b) The length of time a salesperson spent on the phone (ans: continuous)

c) A company’s annual sales. (ans: continuous)

d) The number of widgets sold by a company (ans: discrete)

e) The distance between the earth and the sun. (ans: continuous)


Probability Distributions


Defn: A probability distribution is a representation of the probabilities of each of the possible values of a random variable. The probability distribution may take several forms but is usually represented by a table, graph or equation.

x

P(X)

1

1/6

2

1/6

3

1/6

4

1/6

5

1/6

6

1/6


In the distribution above, what do you notice about the probabilities?


Defn: A distribution in which all values are equally probable is called a uniform distribution.


Examples: Die rolls, coin flips, and the first draw in a bingo game.



Expected Value


The main property of a random variable that we will be discussing is the expected value.


Defn: The expected value of a random variable is defined as

E(X) = x1P(x1)+ x2P(x2) + x3P(x3) + … + xnP(xn)


You may interpret the expected value as a weighted average where the weights correspond to the probability of the particular outcomes.


Example: Let the random variable X represent the value of a die roll. Find the expected value of X.


E(X) = x1P(x1) + x2P(x2) + x3P(x3) + … + x6P(x6)

= 1P(1) + 2P(2) + 3P(3) + … + 6P(6)

= 1/6 + 2*1/6 + 3*1/6 + 4*1/6 + 5 * 1/6 + 6 *1/6

= 1/6 + 2/6 + 3/6 + 4/6 + 5/6 + 6/6

= 21/6

= 3.5


How many rolls are above and below E(X)?


Example: Suppose there is a parking lot of cars of various lengths. There are 7, 10, 4 and 4 cars of length 3m, 3.2m, 3.8m and 4.0m respectively.

  1. Show the probability distribution.

  2. What is the expected value of the length of cars in the parking lot.


Soln:

Length of cars in meters(x)

P(x)

3.0

7/25

3.2

10/25

3.8

4/25

4.0

4/25

b) E[x] = x1P(x1) + x2P(x2) + x3P(x3) + x4P(x4)

= 3 (7/25) + 3.2(10/25) + 3.8(4/25) + 4(4/25)

= 21/25 + 32/25 + 15.2/25 + 16/25

= 3.368 m


Therefore the expected value of the length of cars from this lot is 3.368 meters.



Homework: pg 374 1, 3, 6a b, 8-13