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

ProbabilityStatistics_Probability3 (1)

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

ProbabilityStatistics_Probability3 (1)

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

Chapter 1

Random variables

1.1 Continuous Random Variables


1.1.1 Uniform distribution
A random variable X has uniform distribution in a range (a, b) and we write X ∼ U(a, b)
if its density function is

 1

1 if a < x < b
f (x) = 1l(a,b) (x) = b−a
b−a
0 otherwise.

This type of law appears when we want to take a point at random in an interval.
The distribution function is easily calculated. For x ∈ (a, b)wehave
Z x
1 x−a
F (x) = dy = .
a b−a b−a
So, 

 0 if x < a,

 x−a
F (x) = if a ≤ x < b,

 b−a

1 if x ≥ b.

This tells us that the probability that the value of X is in a certain subinterval (c, d) of
the interval (a, b) is proportional to the length of this subinterval, specifically
d
d−c
Z
1
P (c < X < d) = dx = .
c b−a b−a

Expectation and variance. Expectation is given by


Z b
1 1 b 2 − a2 1 (b + a)(ba) a+b
E(X) = x· dx = = =
a ba ba 2 ba 2 2

1
Note that Expectation is the midpoint of the range (a, b).
Slightly longer calculations would give us the following value of variance:

(b − a)2
V ar(X) = .
12

Example. To make a safety study we choose a random point on the AVE route between
Barcelona and Madrid, which is 506 km long. What is the probability that the point is less
than 150 km from Barcelona?
We define the variable X = ”Distance from Barcelona”. We have X ∼ U (0.506). Its
density is
1
f (x) = 1l(0,506) (x)
506
and its distribution function is

 0 if x < 0,

 x
F (x) = if 0 ≤ x < 506,

 506

1 if x ≥ 506.

So,
150
P (X < 150) = F (150) = = 0.2964
506
Note that if we are asked the probability of choosing any point, for example 183.4276, we
must answer that it is zero:
P (X = 183.4276) = 0.

1.1.2 Exponential distribution


A v.a. X has exponential distribution of parameter λ, where λ is a (strictly) positive
number, if its probability function is given by

λ e−λx if x ≥ 0

f (x) =
0 otherwise.

Write X ∼ Exp(λ).
This distribution is a good model for many situations where the v.a. is a timeout. For ex-
ample, the time between two consecutive particulate emissions of a radioactive substance
fits well with the exponential distribution.
Expectation and variance. Expectation is given by
Z ∞
1
E(X) = x · λe−λx dx = .
0 λ
The value of the integral is obtained by integrating in parts.

2
Analogous calculations would give us the following value of variance:
1
V ar(X) = 2 .
λ

Example. Suppose the duration of a phone call follows an exponential distribution of


parameter 12 . We call this random variable X. We want to calculate:
a) The call is likely to last more than 3 minutes.
b) The probability of the call lasting exactly 3 minutes.
c) The probability that, if we know that the call lasted more than one minute, it will
take less than 2 minutes.
The density function of X is
1 1
f (x) = e− 2 x 1l(0,∞) (x)
2
and its distribution function is
(
0 ifx < 0,
F (x) = 1
1 − e− 2 x if x ≥ 0.
a) Tenim Z ∞
1 −1x 3
P (X > 3) = e 2 dx = e− 2 x = 0.2231
3 2
or, similarly,
3
P (X > 3) = 1 − P (X ≤ 3) = 1 − F (3) = e− 2 x = 0.2231.

b) X is a v.a. continuous, therefore, P (X = 3) = 0.


c) We want to calculate
P (1 < X < 2)
P (X < 2|X > 1) = .
P (X > 1)
On the one hand,
Z 2
1 −1x 1
P (1 < X < 2) = e 2 dx = e− 2 − e−1 .
1 2
In the other hand, Z ∞
1 −1x 1
P (X > 1) = e 2 dx = e− 2 .
1 2
Note that we can calculate the above probabilities analogously with the distribution
function:
1
P (1 < X < 2) = F (2) − F (1) = e− 2 − e−1 ,
1
P (X > 1) = 1 − P (X ≤ 1) = 1 − F (1) = e− 2 .
Finally,
1
e− 2 − e−1 1
P (X < 2|X > 1) = − 12
= 1 − e− 2 = 0.3935.
e
3
1.1.3 Normal distribution
The normal distribution is the most widely used in statistics. On the one hand, it is a
good model for variables that appear in nature (weights, heights, blood cholesterol levels,
...) In fact, the term normal refers to what was thought to be it was the natural pattern
of distributions. On the other hand, certain random variables that appear very frequently
in statistical inference can be approximated by this distribution.
We will say that a v.a. has normal distribution with parameters µ and σ 2 , where µ is a
real number and σ 2 is a strictly positive number, if its density function is

(x − µ)2
 
1
f (x) = √ exp −
2π σ 2σ 2

for all x ∈ R. In this case, we will write X ∼ N (µ, σ 2 ).


Note. Many books use the notation X ∼ N (µ, σ), that is, they use σ instead of σ 2 in
notation. Before making any calculation or interpretation, we must look at the meaning
given by the authors to the parameters.
If we draw this density function we find that it is bell-shaped, which is why it is also
known as Gaussian bell, being symmetrical about the vertical axis passing through the
point x = µ. Figure ?? and Figure ?? show the graph of normal densities with various
parameter values.

Figure 1.1: Density functions of a Normal with σ = 1 and different values of µ.

4
Figure 1.2: Density functions of a Normal with µ = 0 and different values of σ.

Expectation and variance. It can be shown that for X ∼ N (µ, σ 2 ) has


E(X) = µ
V ar(X) = σ 2 .
Therefore, the two parameters of the normal distribution are interpreted, respectively, as
the population mean and variance of the random variable.

Calculations with normal distribution


To calculate the probability that a normal distribution is between two values a and b, we
should calculate the integral Z b
1 (x−µ)2
√ e− 2σ2 dx.
a 2π σ
The function that we have to integrate does not have a primitive one, that is to say a
function that when we derive it gives the function us that we want, expressible in terms
of the known functions: exponentials, polynomials, trigonometric functions, logarithms ...
Therefore, these exact integrals cannot be calculated. Approximate methods of numerical
integration should be used, which we will not discuss here. Because of this, there are
tables for normal distribution with parameters µ = 0 and σ 2 = 1. This particular normal
distribution is called standard normal distribution and is usually denoted by the letter
Z:
Z ∼ N (0, 1).

5
The density of this v.a. has the simplest expression:
1 x2
f (x) = √ e− 2 .

Next we will see that given any normal distribution we can turn it into a standard normal
distribution by means of a linear transformation and solve the calculations of probabilities
with this one.
• Standard Normal Distribution Tables. The tables of the standard normal distri-
bution give us the function
Z z
1 x2
Φ(z) = P (Z ≤ z) = √ e− 2 dx,
−∞ 2π
for all z ≥ 0. That is, the area below the Gaussian bell, between −∞ and z, as shown in
Figure ??.

Figure 1.3: Representation of function Φ.

Using the symmetry of the normal law and that the area below the function from −∞ to
∞ is equal to 1, we have that if z ≤ 0, then
Φ(z) = P (Z ≤ z) = 1 − Φ(−z).
Note that if z is negative, −z will be positive and Φ(−z) is tabulated. Using these
two properties (symmetry and that the total area is 1) we can calculate any probability
involving the standard normal distribution.
• Calculations with any normal distribution. Calculations involving non-standard
normal distributions can be performed using the following theorem:

6
Theorem 1 If X ∼ N (µ, σ 2 ), then the v.a. Z built as
X −µ
Z=
σ
has standard normal distribution.

Note that since σ 2 is the variance of X, the amount that appears in the denominator of
the above expression is the standard deviation σ. So what do we need to do to transform a
v.a. normal with a certain mean and a certain variance in a standard normal distribution
is to subtract the mean and divide by the standard deviation. This process is called
standardization.

Example. Suppose that X ∼ N (3, 4), that is, µ = 3 and σ 2 = 4. We want to calculate

P (2 < X < 6).

First, we standardize by subtracting the mean and dividing by the standard deviation:
 
2−3 X −3 6−3
P (2 < X < 6) = P < <
2 2 2

We have that
X −3
Z= ∼ N (0, 1).
2
Therefore, the above expression is equal to

P (2 < X < 6) = P (−0.5 < Z < 1.5) = Φ(1.5) − Φ(−0.5) = Φ(1.5) − 1 − Φ(0.5)
= Φ(1.5) + Φ(0.5) − 1 = 0.93319 + 0.69146 − 1 = 0.62465.

• Reverse calculations with normal distribution. For inferential statistics the in-
verse problems of what we did in the previous example are of great interest. For example,
it is interesting to know what the number k is such that

P (X ≤ k) = 0.95,

or
P (X ≥ k) = 0.01
or also
P (|X − µ| ≤ k) = 0.90
and other similar problems. Let’s take an example of how to solve such problems.
Example. Let X ∼ N (3, 4). We want to find a number k such that

P (|X − 3| ≤ k) = 0.95.

7
We take out the absolute value and standardize:
   
−k X −3 k −k k
P (|X − 3| ≤ k) = P (−k ≤ X − 3 ≤ k) = P ≤ ≤ =P ≤Z≤ .
2 2 2 2 2

Per so that we find k, we observe that due to the symmetry and that the total area under
the Gaussian bell is 1, we have that between −∞ and k2 we must have an area of 0.975
(make a drawing!). Like this  
k
Φ = 0.975.
2
k
In the tables we find that z corresponds to the probability 0.975 and we find that = 1.96.
2
This implies that k = 2 · 1.96 = 3.92.

Note. Many calculators and software are currently designed for calculations statistics
have the Φ(z) function built-in.

Approximation of Binomial Distribution by Normal


When n is large the binomial distribution is approximated by normal. We think that, for
example, if X ∼ B(500, 0.43) and we have to calculate P (X ≤ 230), the calculations are
quite unaffordable. Therefore, it is interesting to have an approximation result of this law
for n large enough. Specifically, we have the following result:

Theorem 2 Suppose that X ∼ B(n, p). Then, for n big enough,



X ≈ N np, np(1 − p) ,

where the symbol ≈ indicates that the v.a. has this approximate distribution.

The approximation given in the theorem works very well if the condition is satisfied

np(1 − p) ≥ 18.

Some authors use the approximation if np(1 − p) ≥ 5 or even an even weaker condition
is met: np ≥ 5 and n(1 − p) ≥ 5 (both inequalities must be met at the same time). It
should be noted that the approach in these conditions is not too careful.

Example. The probability of a male child being born is 0.515 in a certain geographic
area. If a hospital in this area has 1000 births in a certain year, what is the probability
that the number of boys will not exceed the number of girls during this year?
The random variable
X = Number of male births per 1000
has distribution B(1000, 0515). In addition, the condition is met

np(1 − p) = 1000 · 0.515 · (1 − 0.515) = 249.775 ≥ 18.

8
Then, by Theorem ?? we know that X ≈ N (np, np(1−p)) = N (515, 249, 775). Therefore,
we can proceed as follows
 
X − 515 500 − 515
P (X ≤ 500) = P √ ≤√ ≈ P (Z ≤ −0.95) ,
249, 775 249, 775

where Z is now the standard normal distribution. So,

P (X ≤ 500) ≈ Φ(−0.95) = 1 − Φ(0.95) = 1 − 0.82894 = 0.17106.

You might also like