0% found this document useful (0 votes)
12 views11 pages

G1 Randomvariables

Uploaded by

siheni1001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

G1 Randomvariables

Uploaded by

siheni1001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Topic 7
Random Variables and Distribution Functions
Distribution Functions

1 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Outline

Definition of a Random Variable

Distribution Functions
Discrete Random Variables
Continuous Random Variables

Properties of Distribution Functions

2 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Introduction
statistics probability

universe of sample space - Ω


information and probability - P
⇓ ⇓
ask a question and define a random
collect data variable X
⇓ ⇓
organize into the organize into the
empirical cumulative cumulative
distribution function distribution function
⇓ ⇓
compute sample compute distributional
means and variances means and variances

3 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Definition of a Random Variable


A random variable is a real valued function from the probability space.
X : Ω → R.
Typically, we shall use capital letters near the end of the alphabet, e.g., X , Y , Z for
random variables. The range of a random variable is called the state space.
Exercise. Give some random variables on the following probability spaces, Ω.
1. Roll a die 3 times and consider the sample space
Ω = {(i, j, k); i, j, k = 1, 2, 3, 4, 5, 6} .
2. Flip a coin 10 times and consider the sample space Ω, the set of 10-tuples of
heads and tails.
We can create new random variables via composition of functions:
ω 7→ X (ω) 7→ g (X (ω))
Thus, if X is a random variable, then so are
p
X 2 , exp αX , X 2 + 1, tan2 X , bX c 4 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Distribution Functions
A (cumulative) distribution function of a random variable X is defined by
FX (x) = P{ω ∈ Ω; X (ω) ≤ x} = P{X ≤ x}.
For the complement of {X ≤ x}, we have the survival function
F X (x) = P{X > x} = 1 − P{X ≤ x} = 1 − FX (x).

Choose a < b, then the event {X ≤ a} ⊂ {X ≤ b}. Their set theoretic difference
{X ≤ b} \ {X ≤ a} = {a < X ≤ b}.
Consequently, by the difference rule for probabilities,
P{a < X ≤ b} = P({X ≤ b} \ {X ≤ a}) = P{X ≤ b} − P{X ≤ a} = FX (b) − FX (a).
In particular, FX is non-decreasing.
5 / 11
and less than or equal to b. Consequently, by the difference rule for probabilities,
Definition of a Random Variable Distribution Functions Properties of Distribution Functions
P {a < X  b} = P ({X  b} \ {X  a}) = P {X  b} P {X  a} = FX (b) FX (a). (7.2)

Thus, we can compute the probability that a random variable takes values in an interval by subtracting the distri-
Distribution Functions
bution function evaluated at the endpoints of the intervals. Care is needed on the issue of the inclusion or exclusion of
the endpoints of the interval.
Let X be the sum of the values on two fair dice,
Example 7.8. To give the cumulative distribution function for X, the sum of the values for two rolls of a die, we start
with the table
x 2 3 4 5 6 7 8 9 10 11 12
2 3 4 5 6 7 8 9 10 11 12
P{X = x} 1/36P {Xx2/36
= x} 1/363/36
2/36 4/36 5/36 6/36
3/36 4/36 5/36 6/36 5/36 5/36
4/36 3/36 4/36
2/36 1/36 3/36 2/36 1/36
Here is FX and
thecreate
cumulative
the graph. distribution function.

6 r r
r
1

r
3/4 r
r

r
1/2

r
r
1/4

r
r -
1 2 3 4 5 6 7 8 9 10 11 12

Figure 7.1: Graph of FX , the cumulative distribution function for the sum of the values for two rolls of a die. 6 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Distribution Functions
Notice that the distribution function
• is constant in between the possible values for X ,
• has a jump size at x is equal to P{X = x}, and
• is right continuous.
Call X a discrete random variable if its distribution function FX has these properties.
Examples.
3 6 3
= P{X = 4} = FX (4) − FX (4−) = −
36 36 36
21 6 15 5
P{4 < X ≤ 7} = FX (7) − FX (4) = − = = .
36 36 36 12
21 3 18 1
P{4 ≤ X ≤ 7} = FX (7) − FX (4−) = − = = .
36 36 36 2
7 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Distribution Functions

Exercise.
1. Flip a fair coins 3 times. Let X be the number of heads. Under equally likely
outcomes, find
P{X = x} for x = 0, 1, 2, and 3.
and use this to sketch a graph of the distribution function FX .
2. Deal 5 cards out of a deck of 52. Let X be the number of ♦. Under equally likely
outcomes, use the choose function in R to determine

P{X = x} for x = 0, 1, 2, 3, 4, and 5.

and use this to sketch a graph of the distribution function FX .

8 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Distribution Functions
1

For a dart board with radius 1, assume that 0.8

the dart lands randomly uniformly. Let X be 0.6

0.4

the distance from the center. For x ∈ [0, 1], 0.2

0
x
!0.2

FX (x) = P{X ≤ x} !0.4

!0.6

area inside circle of radius x !0.8

= !1

area of circle !1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1

πx 2
= = x 2.
π12

1.0
0.8
Thus, we have the distribution function

0.6
probability

 0 if x ≤ 0,

0.4
FX (x) = x2 if 0 < x ≤ 1,

0.2
if x > 1.

0.0
1

0.0 0.5 1.0

x
9 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Distribution Functions

Exercise.
1. Find the probability that the dart no more than 1/2 unit from the center.
2. Find the probability that the dart lands further 1/3 unit but no more than 2/3
unit from the center.
3. Find the median, x1/2 so that P{X ≤ x1/2 } = 1/2.

Definition. X is continuous random variable if it has a cumulative distribution function


FX that is differentiable.

10 / 11
Definition of a Random Variable Distribution Functions Properties of Distribution Functions

Properties of Distribution Functions


A distribution function FX has the property that it is right continuous, starts at 0, ends
at 1, and does not decrease with increasing values of x.

1.0
In mathematical terms,

0.8
• For every a, limx→a+ FX (x) = FX (a).

distribution function
• limx→−∞ FX (x) = 0.

0.6
• limx→∞ FX (x) = 1.

0.4
• For every a, b satisfying a < b,

0.2
FX (a) ≤ Fx (b).

0.0
0 5 10 15 20 25

11 / 11

You might also like