Math 365, Elementary Statistics

Lesson 4 : Random Variables

4.1 Random Variablesback to top

Definition. Let S be a sample space. Then a random variable X assigns a numerical value X(w) to each outcome w in S.


Examples. Suppose we pick a KU student at random. Then our sample space S is the whole population of KU students.

  1. Let X be the GPA of the student. If w is a student, X has a value X(w) which is the GPA of w.
  2. Define Y as follows :

    Y(w) = 0 If w is Male   
    Y(w) = 1 If w is Female

  3. Let Z be the height of student w.
  4. Let T be the number of credit hours completed by w.
  5. Let W be the weight of w.
  6. Let D be the total expenses (rounded up to the nearest dollar) of w in 1997.

Then X,Y,Z,T,W,D are all random variables.

Definitions. A random variable X is said to be a discrete random variable if the values that X can assume can be written in a (possibly infinite) list

x1, x2, x3, ….

A random variable X is said to be a continuous random variable if X can assume any value in an interval.

Remark. In this course, examples of discrete random variables are always the number of something: number of typos, number of accidents on a street, number of defective items in a lot, and so on. Examples of continuous random variables are length, weight, and time.

So, Z,W are continuous random variables and X,Y,T,D are discrete random variables.

Examples.

  1. Let X be the number of wrong number calls you receive in a day. Then X is a discrete random variable.

  2. Let X be the waiting time before you receive the next wrong number call. Then X is a continuous random variable.


First, we will be concerned with the discrete random variables.


4.2 Probability Distributionback to top

The probability distribution of a random variable X is a table or a rule or a method that answers probability-related questions regarding X.


Definition. Suppose X is a discrete random variable that assumes the values

x1,x2,….

The probability distribution of X can be described by giving

p(xi) = P(X = xi)

in a table or by a formula. This function p(xi) is called the probability function of X.

So, if the probability distribution of X is given in a table, then it looks like this:

Value
x
Probability
p(x)
x1 p(x1)
x2 p(x2)
x3 p(x3)

Properties of Probability function. Suppose X is a discrete random variable that assumes value

x1, x2, x3,

and let p(x) be the probability function. Then we have the following:

  1. 0 ≤ p(xi) ≤ 1.

  2. p(xi) = 1.


Definition. Let X be a discrete random variable that assumes the values

x1, x2, x3, …

Then the mean μ of X is defined as

μ= xip(xi).

The mean μ is also called the expected value of X and is denoted by E(X). The mean μ is also called the population mean.

Example. Suppose you design a coin toss game. In this game, you give the opponent $3 if a head comes and you collect $1 if a tail comes. Let X be the money you receive. Then X assumes the values -3 and 1. You also have a loaded coin so that

P(H) = 1/9     P(T) = 8/9.

Then the probability distribution of X is given by

Value
x
Probability
p(x)
-3 1/9
1 8/9

So, the mean μ of X is given by

μ= xip(xi)= (-3)(1/9)+1(8/9)=5/9.

Interpretation of mean μ of X. In this example, (see the first example in section 4.1), the mean μ tells us your average win per game if you play for a long time.

Similarly, if Z is the height then the mean μ = E(Z) is the actual mean height of the KU student population. If we take a large sample from the KU student population and compute the sample mean, it should approximate μ.


Definition. Let X be a discrete random variable that assumes values

x1,x2, x3,

Then the variance σ2 of X is defined as

σ2= Variance(X)= (xi-μ)2p(xi).


Some simplification will show

σ2= Variance(X)= xi2p(xi)-μ2.

The standard deviation σ of X is defined as the positive square root of the variance of X.

standard deviation of X= σ =Variance(X)

The variance σ2 is also called the population variance. If we take a large sample and compute the sample variance s2 then s2 will be an estimate for σ2. Similarly, σ is called the population standard deviation.


Problems on 4.2: Probability Distribution

Exercise 4.2.1. The number of passengers X in a car on a freeway has the following probability distribution.

X=x 1 2 3 4 5
p(x) 0.35 0.30 0.15 0.15 0.05

Find:

  1. the expected number of passengers in a car;
  2. the Variance σ2 of the number of passengers;
  3. the probability that the number of passengers in a car is at least 3.

Solution

Exercise 4.2.2. Karin is a plumber who works for 3 different employers. Employer A pays her $120 a day, employer B pays her $70 dollars a day, and employer C pays her $180 a day. She works for whoever calls her first. The probability that employer A calls her first is 0.30; the probability that employer B calls first is .20; and the probability that employer C calls her first is 0.40 (the probability that no one calls is .10). What is the expected income and variance of Karin per day?
Solution

Exercise 4.2.3. An insurance company sells a flight insurance policy at a flat rate of $500 per flight. If a policyholder dies in flight, the insurance company pays $100,000 to the survivors. The probability that a policyholder will die in flight is .003. What is the expected gain and variance of the company per sale?
Solution


4.3 The Bernoulli and Binomial Experimentsback to top

There are many random variables that we encounter fairly often. The first one that we discuss is called a Bernoulli random variable.


Definition. There are many statistical experiments that have only two outcomes. In such cases, the outcomes may be called a success or a failure. So the sample space is

S={s,f}.

Here s means success and f means failure.

Such an experiment is called a Bernoulli trial. Given a Bernoulli trial, we can define a random variable as

X = 1 if success
X = 0 if failure


If the probability P(success) = p then we have P(failure) = 1-p. So, the probability distribution of a Bernoulli random variable is given by

Value
x
Probability
p(x)
0 1-p
1 p

The mean of X is

μ = 0(1-p)+1p = p.

The variance of X is

σ2 = xi2p(xi) - μ2 = (0.(1-p)+1p) -p2 = p-p2 = p(1-p).



Binomial Random Variable


Definition. An interesting statistical experiment is a combination of n "identical and independent" Bernoulli trials. Such an experiment is called a binomial experiment. More formally, given a positive integer n and a number p with 0 ≤ p ≤ 1 a binomial(n,p) experiment (or B(n,p) experiment) is characterized as follows:

  1. A binomial experiment consists of n identical and independent Bernoulli trials.
  2. The probability of success in each trial remains fixed and is equal to p.


Definition. Given a B(n,p)-experiment, let

X = total number of successes in these n trials.

Then X is called a binomial (n,p)-random (or B(n,p)-random) variable. Following are some important facts about a B(n,p)-random variable X:

  1. X can assume values 0,1,…,n. The probability distribution is given by

    p(r) = P(X = r) = P(r success) = nCr pr(1-p)n-r


    where r runs through 0,1,2,…,n.


  2. The mean of X is

    μ = E(X) = np.


  3. The variance of X is

    σ2 = Variance(X) = np(1-p).


Problems on 4.3: Binomial Experiments

Exercise 4.3.1. Let X be a B(6,.3)-random variable. Find P(X = 2). Also find the probability that X is at least 2.
Solution

Exercise 4.3.2. According to a report entitled "Pediatric Nutrition Surveillance" published by Centers for Disease Control (CDC), 18 percent of children younger than 2 years had anemia in 1997. On a particular day, a pediatrician examined 11 children.

  1. What is the probability that none will have anemia?
  2. What is the probability that exactly 5 will have anemia?
  3. What is the probability that all will have anemia?
  4. Compute the expectation and variance of the number of children with anemia.
  5. What is the probability that at least 7 will have anemia?

Solution

Exercise 4.3.3. A gardener planted 15 seeds. The probability that a seed will germinate is 0.1.

  1. What is the probability that exactly 3 seeds will germinate?
  2. What is the probability that exactly 4 seeds will germinate?
  3. What is the probability that exactly 9 seeds will germinate?
  4. Compute the expected number of seeds that will germinate.
  5. Compute the standard deviation of the number of seeds that will germinate.
  6. What is the probability that at most 4 seeds will germinate?

Solution

Exercise 4.3.4. In a particular county, 60 percent of the population is Hispanic.

  1. What is the probability that a jury of 12 will have exactly 6 Hispanic members?
  2. What is the probability that a jury of 12 will have more than 6 Hispanic members?

Solution

Exercise 4.3.5. From the hiring statistics of a corporation (say IBM), it is known that for every 4 interviews they give, they make 1 job offer. Suppose that the corporation interviews 8 candidates each time it comes to campus. What is the mean and standard deviation of the number of job offers made each time?
Solution s

back to top