Download Random Variables Definition: Let S be a sample space. A function X

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia, lookup

Statistics wikipedia, lookup

Probability wikipedia, lookup

Randomness wikipedia, lookup

Transcript
MAT 2379 3X (Spring 2012)
Random Variables - Part I
“While writing my book [Stochastic Processes] I had an argument with
Feller. He asserted that everyone said random variable and I asserted that
everyone said chance variable. We obviously had to use the same name in our
books, so we decided the issue by a stochastic procedure. That is, we tossed for
it and he won.” - Doob, J.
Random Variables
Definition: Let S be a sample space. A function X : S → R,
that assigns real numbers to the outcomes in the sample space is
called a random variable.
Note:
We will use upper-case letters from the end of the alphabet to denote random variables, for example X, Y, Z, W, . . . Observed values will be denoted with lower case letters, for example
x, y, z, w, . . .
Note: We call the set of real numbers taken by the random variable X its range and we denote it RX . Please note that the author
of your textbook does not have a notation for the range of a random
variable, nonetheless we will use RX as the notation for the range
of X.
Classification: Let X be a random variable with range RX .
1. If RX is finite or countably infinite then we say that X is a
discrete random variable.
2. If RX is an interval of real numbers then we say that X is a
continuous random variable.
1
Defining Events with random variable: We can construct
events with random variables. Here are a few examples:
1. Let A ⊆ R, we view {X ∈ A} as the following event
{X ∈ A} = {s ∈ S : X(s) ∈ A}.
2. Let x be a real number, we view {X = x} as the following
event
{X = x} = {s ∈ S : X(s) = x}.
3. Let x be a real number, we view {X ≤ x} as the following
event
{X ≤ x} = {s ∈ S : X(s) ≤ x}.
Discrete Random Variables
Consider X a discrete random variable with range RX = {x1 , x2 , . . . , xk },
where k could be infinite. We will specify probabilities associated
with the random variable with either
• a probability mass function fX where
fX (x) = P (X = x), x ∈ RX ;
or either
• a cumulative distribution function FX where
X
FX (x) = P (X ≤ x) =
fX (y).
y∈RX :y≤x
Note: The specification of these probabilities is called the distribution of X.
2
Example 1: Consider a population of black bears that gave
birth in the last year. Let X be the number of cubs for a particular
female. Its probability mass function is
x
f (x)
1
0.2
2
0.5
3
0.2
4
0.06
5
0.04
1. What is the range of the random variable X?
2. Produce a stick diagram of the probability mass function.
3. Give the cumulative distribution function of X.
4. Compute the following probabilities:
(a) P (X = 3)
(b) P (1 < X ≤ 3)
(c) P (X > 5)
3
Properties of the probability mass function:
1. 0 ≤ fX (x) ≤ 1
P
2. x∈RX fX (x)
3. Computational Property:
X
P (X ∈ A) =
fX (x)
x∈A:x∈RX
We will now define parameters of a distribution that will allow
us to describe it or compare it to other distributions. A few of these
parameters are defined using a notion of expectation that we define
below.
Expectation
Definition: Let X be a discrete random variable with range
RX and probability mass function fX . The expected value of X
is defined as
X
E[X] =
x fX (x).
x∈RX
Remarks:
• E[X] is the weighted average of the possible values taken by
X, where fX (x) are the weights.
• Interpretation: If we were to repeat the experiment a large
number of times, then we expect the values of X approximately
equal to E[X] on average. Thus, we say that Thus, we say that
the expected value of X is E[X].
4
Definition: Let X be a discrete random variable with range
RX and probability mass function fX . Its mean is defined as
X
µX = E[X] =
x fX (x).
x∈RX
Its variance is defined as
2
σX
= V [X] = E[(X − µ)2 ] =
X
(x − µ)2 f (x).
x∈RX
Its standard deviation is defined as
p
σX = Var(X).
Alternate formula for the variance: The following formula
can also be used to calculate the variance. It is computationally
more efficient than the definition.
!
X
2
2
2
2
σX = V [X] = E[X ] − µ =
x fX (x) − µ2 .
x∈RX
Remarks:
• The mean of X represents the center of mass of the distribution
and also the expected value of the random variable.
• The variance of X is a measure of the variability or dispersion
of the values about the mean, in units squared.
• The standard deviation also measures the variability or the
dispersion of the values about the mean, but in the same units
as the original measurements.
5
Example 2: Refer to Example 1. Suppose that Y represents the
number of cubs from a particular black bear female that gave birth
to cubs in a different population of black bears. Its probability mass
function is
y
1
fY (x) 0.2
2
0.3
3
0.3
4
0.2
5
0.1
1. Produce graphs of the distributions of X and Y .
2. Compute and compare the means of X and Y .
3. Compute the standard deviations of X and Y .
6
Binomial Distribution
Definition: A Bernoulli trial is a random experiment with
two possible outcomes, “success” and “failure”. Let p denote the
probability that the success occurs.
Definition: A binomial experiment consists of n repeated
independent Bernoulli trials, each with the same probability of success p.
Definition: A binomial random variable X is equal to
the number of successes in a binomial experiment consisting of n
Bernoulli trials. We say that X follows a binomial distribution with
parameters n and p.
Notation : X ∼ B(n, p)
Remarks:
• If we are sampling without replacement then it should be evident that the composition of the population changes and that
the probability of success can change from trial to trial. However, if the group being sampled from is large, as it is often the
case, then the change could be so slight as to be negligible. In
this case, we consider the trials as independent with p equal to
the original probability of success.
• With a Bernoulli trial we can define a Bernoulli random variable
1, outcome is a success
I=
0, outcome is a failure
Its expectation and variance are respectively
E[I] = 0 · (1 − p) + 1 · p = p
and
Var[I] = E[I 2 ] − (E[I])2 = 02 (1 − p) + 12 p − p2 = p (1 − p).
7
• Let X be a binomial random variable B(n, p), then its mean
and variance are respectively
E[X] = n p
and
V [X] = n p (1 − p).
• Let X ∼ B(n, p), then its probability mass function is
n
f (x) = P (X = x) =
px (1 − p)n−x , x = 0, 1, 2, . . . , n.
x
n
Note: The following quantity
is known as the binomial
r
coefficient. It represents the number of different ways that the
x successes can be distributed among the n trials. It has other
notation:
n!
n
= nCr =
r
r! (n − r)!
8
Example 3: Even though tetanus is rare, it is fatal 70% of the
time. Suppose that three persons contract tetanus during one year.
Assume independence among individuals.
(a) How many do we expect to die?
(b) What is the standard deviation of the number that will die
among the three that contracted tetanus?
(c) Compute the probability that at most 1 will die.
Example 4: It is estimated that about 1% of the Canadian
population has Alopecia Areata. Suppose that 100 canadians were
selected at random to be part of a study. Let X be the number of
subjects with Alopecia Areata among the n = 100 subjects in the
sample.
(a) How many of the selected individuals to we expect to have the
disease?
(b) What is the standard deviation of the number of the selected
individuals with the disease?
(c) Use Minitab to compute the probability that at most 10 will
have the disease?
(d) Use Minitab to compute the probability that at least 10 will
have the disease?
9