0% found this document useful (0 votes)
3 views

Chapter 2-1

A random variable is a function that assigns real numbers to outcomes in a sample space, categorized as discrete or continuous based on the countability of outcomes. Discrete random variables represent count data, while continuous random variables represent measured data, with examples provided for each type. The document also discusses probability distributions, including probability mass functions for discrete variables and probability density functions for continuous variables, along with examples and exercises for further understanding.

Uploaded by

mayadanasr996
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Chapter 2-1

A random variable is a function that assigns real numbers to outcomes in a sample space, categorized as discrete or continuous based on the countability of outcomes. Discrete random variables represent count data, while continuous random variables represent measured data, with examples provided for each type. The document also discusses probability distributions, including probability mass functions for discrete variables and probability density functions for continuous variables, along with examples and exercises for further understanding.

Uploaded by

mayadanasr996
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Random Variables

Definition
A random variable is a function that associates a real
number with each element in the sample space.
𝑋: 𝑆 → 𝑅
 We shall use a capital letter, say X, to denote a random
variable and its corresponding small letter, x in this
case, for one of its values.
Definition
A random variable is called a discrete random variable if
its set of possible outcomes is countable.
Definition
A random variable can take on values on a continuous
scale, it is called a continuous random variable
EXAMPLES
Discrete Random Continuous Random
Variable Variable
Represent count data Represent measured data
the number of defectives heights
the number of accidents per
weights
years
temperatures
distance
life periods
CONCEPT OF A RANDOM VARIABLE

Statistics is concerned with making inferences about


populations and population characteristics.
Experiments are conducted with results that are
subject to chance. The testing of a number of
electronic components is an example of a statistical
experiment, a term that is used to describe any
process by which several chance observations are
generated. It is often important to allocate a numerical
description to the outcome.
For example,
the sample space giving a detailed description of each
possible outcome when three electronic components are
tested may be written
Random variable X represents the number of
defectives S R
D DDD 3
D N DDN 2
D N D DND 2
N DNN 1
N D D NDD 2
N N NDN 1
D NND 1
N NNN 0
For example, the sample space giving a detailed
description of each possible outcome when three
electronic components are tested may be written
S = {NNN,NND,NDN,DNN,NDD,DND,DDN,DDD},
where N denotes non-defective
D denotes defective.
One is naturally concerned with the number of
defectives that occur. Thus, each point in the sample
space will be assigned a numerical value of 0, 1, 2, or
3.
Discrete probability distributions
 The set of ordered pairs (x, f(x)) is a probability
function, probability mass function, or probability
distribution of the discrete random variable X if, for
each possible outcome x,
1. f(x) ≥ 0,
2. σ𝑥 f(x)= 1,
3. P(X = x) = f(x).
 The cumulative distribution function F(x) of a
discrete random variable X with probability
distribution f(x) is
F(x) = P(X ≤ x) =σt≤𝑥 f(t), for −∞ < x < ∞.
The probability distribution of X is

x 0 1 2 3

f(x) 1/8 3/8 3/8 1/8

𝑷 𝑫 = 𝟎. 𝟓 𝑷 𝑵 = 𝟎. 𝟓
DDD 3 𝑷 𝑫𝑫𝑫 =𝑷 𝑫 . 𝑷 𝑫 . 𝑷 𝑫 =0.5*0.5*0.5= 1/8
DDN 𝟐 𝑷 𝑫𝑫𝑵 =𝑷 𝑫 . 𝑷 𝑫 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
DND 1 𝑷 𝑫𝑵𝑫 =𝑷 𝑫 . 𝑷 𝑵 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
DNN 1 𝑷 𝑫𝑵𝑵 =𝑷 𝑫 . 𝑷 𝑵 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
NDD 𝟐 𝑷 𝑵𝑫𝑫 =𝑷 𝑵 . 𝑷 𝑫 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
NDN 𝟏 𝑷 𝑵𝑫𝑵 =𝑷 𝑵 . 𝑷 𝑫 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
NND 1 𝑷 𝑵𝑵𝑫 =𝑷 𝑵 . 𝑷 𝑵 . 𝑷 𝑫 =0.5*0.5*0.5=1/8
NNN 𝟎 𝑷 𝑵𝑵𝑵 =𝑷 𝑵 . 𝑷 𝑵 . 𝑷 𝑵 =0.5*0.5*0.5=1/8
EXAMPLE 1
A shipment of 20 similar laptop computers to a retail
outlet contains 3 that are defective. If a school makes a
random purchase of 2 of these computers, find the
probability distribution for the number of defectives.
Solution: Let x are the possible numbers of defective
computers purchased by the school. Then x can only take
the numbers 0, 1 and 2.
f(0) = P(X = 0)=136/190
f(1) = P(X = 1)=51/190
f(2) = P(X = 2)=3/190
The probability distribution of X is
x 0 1 2
f(x) 136/190 51/190 3/190

The cumulative distribution function is

0 𝑓𝑜𝑟 𝑥 < 0
136
𝑓𝑜𝑟 0 ≤ 𝑥 < 1
190
F(x)= 187
𝑓𝑜𝑟 1 ≤ 𝑥 < 2
190
1 𝑓𝑜𝑟 𝑥 ≥ 2
Continuous probability distributions
 The function f(x) is a probability density function
(pdf) for the continuous random variable X, defined
over the set of real numbers, if
1. f(x) ≥ 0, for all x ϵR.

2. ‫׬‬−∞ f(x) dx = 1.
𝑏
3. P(a < X < b) =‫ 𝑎׬‬f(x ) dx
 The cumulative distribution function F(x) of a
continuous random variable X with density function
𝑥
f(x) is F(x) = P(X ≤ x) = ‫׬‬−∞ f(t) dt, for −∞ < x < ∞
EXAMPLE 2
Suppose that the error in the reaction temperature, in ◦
C, for a controlled laboratory experiment is a
continuous random variable X having the probability
density function
𝑥2
𝑓 𝑥 =ቐ3 , −1 < 𝑥 < 2
0, 𝑒𝑙𝑠𝑤ℎ𝑒𝑟𝑒
(a) Verify that f(x) is a density function.
(b) Find P(0 < X ≤ 1).
(c) find F(x), and use it to evaluate P(0 < X ≤ 1).
Solution:
∞ 2 𝑥2 𝑥3 2
(a) ‫׬‬−∞ f(x) dx = ‫׬‬−1 3 dx = ฬ =1
9 −1
1 𝑥2 1
(b) P(0 < X ≤ 1)= ‫׬‬0 dx =
3 9
0, 𝑥 < −1
𝑥 3 +1
(c) F(x)=൞ 9 , −1 ≤𝑥<2
1, 𝑥 ≥ 2
2 1 1
P(0 < X ≤ 1)=F(1)-F(0)= − =
9 9 9
EXERCISES
1. Classify the following random variables as discrete or
continuous:
X: the number of automobile accidents per year in
Virginia.
Y : the length of time to play 18 holes of golf.
2. Let W be a random variable giving the number of
heads minus the number of tails in three tosses of a
coin. List the elements of the sample space S for the
three tosses of the coin and to each sample point assign
a value w of W.
3. Determine the value c so that each of the following
functions can serve as a probability distribution of
the discrete random variable X:
(a) f(x) = c(𝑥 2 + 4), for x = 0, 1, 2, 3;
2 3
(b) f(x) =c 𝑥 3−𝑥
, for x = 0, 1, 2
4. Consider the density function f 𝑥
𝑘 𝑥, 0 < 𝑥 < 1
=ቊ
0, 𝑒𝑙𝑠𝑤ℎ𝑒𝑟𝑒
(a) Evaluate k.
(b) Find F(x) and use it to evaluate P(0.3 < X < 0.6).

You might also like