Math 365, Elementary Statistics |
|||||||||||||||||||||||||||||||||||
Lesson 4 : Random Variables4.1 Random VariablesDefinition. Let S be a sample space. Then a random variable X assigns a numerical value X(w) to each outcome w in S.
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.
|
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:
0 ≤ p(xi) ≤ 1.
∑ 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:
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
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:
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:
p(r) = P(X = r) = P(r success) = nCr pr(1-p)n-r
where r runs through 0,1,2,…,n.
μ = E(X) = np.
σ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.
Exercise 4.3.3. A gardener planted 15 seeds. The probability that a seed will germinate is 0.1.
Exercise 4.3.4. In a particular county, 60 percent of the population is Hispanic.
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