7 Continuous Variables, Summaries of Computational and Statistical Data Analysis

The mode of a continuous probability distribution is the point at which the probability density function attains its maximum value. The median of a continuous ...

Typology: Summaries

2022/2023

Uploaded on 03/01/2023

carlick
carlick 🇺🇸

4.2

(11)

276 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
7 Continuous Variables
7.1 Distribution function
With continuous variables we can again define a probability distribution but instead of
specifying Pr(X=j) we specify Pr(X < u) since Pr(u < X < u +δ)0 as δ0.For
example, if Xis the amount of oil (in barrels) which will be extracted from a particular
well then we can find Pr(X < 1000000) or Pr(X < 500000) but it makes no sense to talk
about Pr(X= 750000) because we could measure the amount more precisely and find
that it was not exactly 750000 barrels.
We can plot a graph of Pr(X < u) against u. This graph represents a function of u.
This function is called the distribution function of X. We might write it as F(u).Hence
Pr(X < u) = F(u).Because this is a probability, it is always between 0 and 1. That
is 0 F(u)1.Also, because, for example, the probability that X < 600000 must
be at least as big as the probability that X < 500000,we can say that if w > u then
F(w)F(u).
7.2 Probability density function
Another important way of representing a continuous probability distribution is the prob-
ability density function or pdf. This is actually the gradient of the distribution function.
That is the pdf is
f(u) = dF (u)
du .
If we draw a graph of the probability density function then probabilities are represented
by areas under the curve on the graph. For example, the probability that 500000 < X <
600000 is the area above the axis and below the curve between the limits at 500000 and
600000.
Note that
Zw
−∞
f(u).du =F(w),
Z
−∞
f(u).du = 1.
7.3 Mode and median
The mode of a continuous probability distribution is the point at which the probability
density function attains its maximum value. The median of a continuous probability
distribution is the point at which the distribution function has the value 0.5.
7.4 Example
A continuous random variable Xhas the following distribution function.
FX(u) =
0 (u < 0)
3
4(u2u3/3) (0 u2)
1 (u > 2)
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download 7 Continuous Variables and more Summaries Computational and Statistical Data Analysis in PDF only on Docsity!

7 Continuous Variables

7.1 Distribution function

With continuous variables we can again define a probability distribution but instead of specifying Pr(X = j) we specify Pr(X < u) since Pr(u < X < u + δ) → 0 as δ → 0. For example, if X is the amount of oil (in barrels) which will be extracted from a particular well then we can find Pr(X < 1000000) or Pr(X < 500000) but it makes no sense to talk about Pr(X = 750000) because we could measure the amount more precisely and find that it was not exactly 750000 barrels. We can plot a graph of Pr(X < u) against u. This graph represents a function of u. This function is called the distribution function of X. We might write it as F (u). Hence Pr(X < u) = F (u). Because this is a probability, it is always between 0 and 1. That is 0 ≤ F (u) ≤ 1. Also, because, for example, the probability that X < 600000 must be at least as big as the probability that X < 500000 , we can say that if w > u then F (w) ≥ F (u).

7.2 Probability density function

Another important way of representing a continuous probability distribution is the prob- ability density function or pdf. This is actually the gradient of the distribution function. That is the pdf is

f (u) = dF (u) du

If we draw a graph of the probability density function then probabilities are represented by areas under the curve on the graph. For example, the probability that 500000 < X < 600000 is the area above the axis and below the curve between the limits at 500000 and

Note that ∫ (^) w

−∞

f (u).du = F (w), ∫ (^) ∞

−∞

f (u).du = 1.

7.3 Mode and median

The mode of a continuous probability distribution is the point at which the probability density function attains its maximum value. The median of a continuous probability distribution is the point at which the distribution function has the value 0.5.

7.4 Example

A continuous random variable X has the following distribution function.

FX (u) =

  

0 (u < 0) 3 4 (u (^2) − u (^3) /3) (0 ≤ u ≤ 2) 1 (u > 2)

The median is 1.0. The probability density function is as follows.

fX (u) =

  

0 (u < 0) 3 4 (2u^ −^ u

(^2) ) (0 ≤ u ≤ 2) 0 (u > 2)

The mode is 1.0. The probability that 0. 5 < X < 1 .5 can be found as follows.

Pr(0. 5 < X < 1 .5) = FX (1.5) − FX (0.5)

=

(

  1. 52 −

)

Alternatively

Pr(0. 5 < X < 1 .5) =

∫ (^1). 5

  1. 5

fX (u).du.

7.5 Expectation

The results concerning expectation etc. for continuous random variables are similar to those for discrete random variables with the summations replaced with integrals. Let X be a continuous random variable with pdf fX (u). Then

E(X) =

∫ (^) ∞

−∞

ufX (u).du.

For example, in the example above,

E(X) =

∫ (^) ∞

−∞

ufX (u).du

∫ (^2)

0

(2u^2 − u^3 ).du

[ 2 u^3 3

u^4 4

] 2

0 = 1.

7.8 The continuous uniform distribution

Let a and b be two real numbers such that a < b. If a random variable X has the probability density function

fX (u) =

{ (b − a)−^1 a ≤ u ≤ b 0 otherwise

we say that X has a continuous uniform distribution on the interval [a, b]. That is X ∼ U (a, b). The distribution function is

FX (u) =

  

0 u < a (u − a)/(b − a) a ≤ u ≤ b 1 u > b

The mean of X is obviously (b − a)/2 but we can find this formally as follows.

E(X) = (b − a)−^1

∫ (^) b

a

u.du

= (b − a)−^1

{ 1 2

(b^2 − a^2 )

}

(b − a)(b + a) (b − a) =

(b + a)

Similarly we can find the variance. First recall that var(X) = E

( {X − E[X]}^2

) .

var(X) = (b − a)−^1

∫ (^) b

a

{ u −

(b + a)

} 2 .du

= (b − a)−^1

∫ (^) (b−a)/ 2

−(b−a)/ 2

v^2 .dv

(b − a)^2 12 where v = u − (b + a)/ 2. Example: A car ferry over a short crossing leaves from one side every 20 minutes. A car arrives at a random point in time to use the ferry. The distribution of waiting time in minutes is uniform(0, 20). The mean is 10 minutes, the variance is 33.333 and the standard deviation is 5.77 minutes. The probability that the waiting time is more than 5 minutes is 0.25 etc.

7.9 The negative exponential distribution

Let λ be a positive real number. If a random variable T has the probability density function

fT (t) =

{ 0 (t < 0) λe−λt^ (0 ≤ t < ∞)

we say that T has a negative exponential distribution ( sometimes called simply an “exponential distribution.”) The distribution function is

FT (t) =

{ 0 (t < 0) 1 − e−λt^ (0 ≤ t < ∞)

In finding the mean and variance it helps first to evaluate E(T n) for n ≥ 1.

E(T n) =

∫ (^) ∞

−∞

tnfT (t).dt

=

∫ (^) ∞

0

tnλe−λt.dt

=

[ −tne−λt

]∞ 0 +

∫ (^) ∞

0

ntn−^1 e−λt.dt

=

n λ E(T n−^1 )

Now E(T 0 ) = E(1) = 1 so

E(T ) =

λ and E(T 2 ) = 2/λ^2 so

var(T ) =

λ^2

( 1 λ

) 2

λ^2

7.10 Relationship of the negative exponential distribution to the Poisson

distribution

Consider a series of “events” at points in time which are random and independent in such a way that they are equally as likely to occur at any time as at any other time and the

mean is ¯x = 16.3 and the sample standard deviation is s = 5.7 then we would estimate θ using θˆ = s/ 1 .28255 = 5. 7 / 1 .28255 = 4.444 and estimate ξ using ξˆ = ¯x − 0. 57722 θˆ =

  1. 3 − 0. 57722 × 4 .444 = 13. 73.

7.12 Rayleigh distribution

The Rayleigh distribution is often used to model wave heights and wind speeds. The distribution function is

F (x) = 1 − exp

{ −

x^2 2 θ^2

}

for 0 < x < ∞. The probability density function is

f (x) =

xe−x^2 /^2 θ^2 θ^2

mean θ

√ π/2 = 1. 2533 θ variance (4 − π)θ^2 /2 = 0. 42920 θ^2 standard deviation θ

√ {(4 − π)/ 2 } = 0. 65514 θ Note that E(X^2 ) = var(X) + [E(X)]^2 = 2θ^2. There is only one parameter, θ. We can estimate it using the sample mean so that ˆθ = ¯x/√π/2 = ¯x/ 1. 2533.

7.13 Problems

  1. The number of failures occurring in a machine of a certain type in a year has a Poisson distribution with mean 0.4. In a factory there are ten of these machines. What is

(a) the expected total number of failures in the factory in a year? (b) the probability that there are fewer than two failures in the factory in a year?

  1. A man goes fishing. The number of fish he catches in one hour has a Poisson distribution with mean 1.25. He continues fishing for four hours, then goes home, unless he catches five fish before the four hours are up, in which case he goes home as soon as he has caught the fifth fish. Find

(a) the probability that he goes home with three fish. (b) the expected number of fish he takes home.

  1. There are five machines in a factory. Of these machines, three are working properly and two are defective. Machines which are working properly produce articles each of which has independently a probability of 0.1 of being imperfect. For the defective machines this probability is 0.2. A machine is chosen at random and five articles produced by the machine are ex- amined. What is the probability that the machine chosen is defective given that, of the five articles examined, two are imperfect and three are perfect?
  1. A continuous random variable T has the following probability density function.

fT (u) =

  

0 (u < 0) 3(1 − u/k) (0 ≤ u ≤ k) 0 (u > k)

Find

(a) k. (b) E(T ). (c) E(T 2 ). (d) var(T ).

  1. A continuous random variable X has the following probability density function

fX (u) =

0 (u < 0) ku (0 ≤ u ≤ 1) 0 (u > 1)

(a) Find k. (b) Find the distribution function FX (u). (c) Find E(X). (d) Find var(X). (e) Find E(eX^ ). (f) Find var(eX^ ). (g) Find the distribution function of eX^. (Hint: For what values of X is eX^ < u?) (h) Find the probability density function of eX^. (i) Sketch fX (u). (j) Sketch FX (u).