Download S2 Continuous Random Variables

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

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

Document related concepts
no text concepts found
Transcript
1.
If y =
5x2
– 2x + 1, find
𝑑𝑦
.
𝑑π‘₯
𝑑𝑦
= 10π‘₯ βˆ’ 2
𝑑π‘₯
2.
Find the turning point of the function given in question 1.
10π‘₯ βˆ’ 2 = 0
1
π‘₯=
5
2
4
1
1
𝑦=5
βˆ’2
+1 =
5
5
5
1 4
π‘‡π‘’π‘Ÿπ‘›π‘–π‘›π‘” π‘π‘œπ‘–π‘›π‘‘: ,
5 5
3.
Solve 3x2 – 8x + 1 = 0 giving your answers to 2 decimal places.
π‘Ž = 3,
π‘₯=
𝑏 = βˆ’8,
8±
βˆ’8
2
𝑐=1
βˆ’ 4(3)(1)
6
8 ± 52
π‘₯=
6
π‘₯ = 2.54, 0.13
4.
Calculate
2
βˆ’1
π‘₯ 2 βˆ’ 2π‘₯ + 5 𝑑π‘₯
2
x
οƒΉ
ο€½ οƒͺ ο€­ x 2  5x οƒΊ
3
 ο€­1
3
2
 2
οƒΆ  (ο€­1)
οƒΆοƒΉ
2
2
ο€½ οƒͺ ο€­ 2  5(2) οƒ· ο€­ 
ο€­ (ο€­1)  5(ο€­1) οƒ·οƒΊ
οƒΈ  3
 ο€­1
 3
26
19
ο€½ 15
ο€½ ο€­ο€­
3
3
3
3
Suppose the heights of a very large number of 17 year olds was
surveyed
The total area under the graph is 1 and particular areas represent
probabilities
Suppose the class widths were refined to 0.1m
Assuming that enough data was collected the class widths
could be further reduced until the β€˜relative frequency
polygon’ approximates to a curve. When the function β€˜f(x)’
is found for the curve, it is called the probability density
function, or pdf
To be a probability density function (pdf), f(x) must satisfy these
basic properties:
οƒ˜ f(x) β‰₯ 0 for all x, so that no probabilities are negative
οƒ˜
∞
𝑓
βˆ’βˆž
π‘₯ 𝑑π‘₯ = 1 ; often f(x) is only defined over a small
range, in which case the integral over that range will be 1.
You can find the probability that a
random variable lies between
x = a and x = b from the area
under the curve represented by
f(x) between these two points.
Example 1
(a)
Show that f(x) is a probability density function where
1
𝑓 π‘₯ = 2 π‘₯ βˆ’ 3 π‘“π‘œπ‘Ÿ 3 ≀ π‘₯ ≀ 5
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
οƒ˜ f(x) β‰₯ 0 for all x, so that no probabilities are negative
f(x) is positive for all values of x
οƒ˜
∞
𝑓
βˆ’βˆž
π‘₯ 𝑑π‘₯ = 1 ; often f(x) is only defined over a small
range, in which case the integral over that range will be 1.
5
2
2
1
x

οƒΉ

1
5
3

οƒΆ

οƒΆοƒΉ
1
ο€½
ο€­
3
x
 2 (x ο€­ 3)dx 2 οƒͺ 2  3 ο€½ 2 οƒͺ 2 ο€­ 3(5) οƒ·οƒΈ ο€­  2 ο€­ 3(3) 
5
2
3
1 5
9οƒΉ
ο€½1
ο€½ ο€­ ο€­ο€­
οƒͺ
οƒΊ
2 2
2
Example 1
(a)
Show that f(x) is a probability density function where
1
𝑓 π‘₯ = 2 π‘₯ βˆ’ 3 π‘“π‘œπ‘Ÿ 3 ≀ π‘₯ ≀ 5
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
(b)
Find P(X < 4)
4
1
P( X ο€Ό 4) ο€½  (x ο€­ 3)dx
2
3
4
2
1 x
οƒΉ
P( X ο€Ό 4) ο€½ οƒͺ ο€­ 3x οƒΊ
2 2
3
1  4 2
οƒΆ  32
οƒΆοƒΉ
P( X ο€Ό 4) ο€½ οƒͺ ο€­ 3(4) οƒ· ο€­  ο€­ 3(3) οƒ·οƒΊ
2  2
οƒΈ 2

1
9
P(X ο€Ό 4) ο€½  4 ο€­ ο€­ οƒΉ
2 οƒͺ
2 
1
P( X ο€Ό 4) ο€½
4
𝒃
𝒇
𝒂
𝑷 𝒂<𝑿<𝒃 =
If f(x) is a pdf, then
𝒙 𝒅𝒙
Example 2
𝑓 π‘₯ =
π‘₯
2βˆ’π‘₯
0
π‘“π‘œπ‘Ÿ 0 ≀ π‘₯ ≀ 1
π‘“π‘œπ‘Ÿ 1 ≀ π‘₯ ≀ 2 gives a pdf.
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
Draw the pdf and find P(0.5 < x < 1.3)
1.3
1
P(0.5 < x < 1.3) ο€½  xdx   (2 ο€­ x)dx
f(x)
0.5
1
1
1.3
x οƒΉ
x οƒΉ 
ο€½ οƒͺ οƒΊ  οƒͺ2 x ο€­ οƒΊ
2 1
 2  0.5 
1
2
2
ο€½ 0.63
0
1
2
x
Example 3
2
π‘˜
9
βˆ’
π‘₯
π‘“π‘œπ‘Ÿ βˆ’ 3 ≀ π‘₯ ≀ 3
𝑓 π‘₯ =
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
(a)
Find the value of k and calculate P(-1 < X < 2)
(b)
Find
P(X = 2)
∞
(a) οƒ˜
𝑓 π‘₯ 𝑑π‘₯ = 1 ; often f(x) is only defined over a small
βˆ’βˆž
range, in which case the integral over that range will be 1.
3
3
3
3 3

3
(
ο€­
3
)

οƒΆ

οƒΆοƒΉ
x

οƒΉ
2
k
(
9
ο€­
x
)
dx
ο€½
1
k
9
(
3
)
ο€­
ο€­
9
(
ο€­
3
)
ο€­
k οƒͺ9 x ο€­ οƒΊ ο€½ 1

οƒ· 
οƒ·οƒΊ ο€½ 1
οƒͺ
3
3οƒΈ 
3 
3  ο€­3


1
k(18 ο€­ ο€­18) ο€½ 1 36k ο€½ 1 k ο€½
36
2
3
3
3

1
2
(
ο€­
1
)

οƒΆ

οƒΆοƒΉ
1
x οƒΉ ο€½
 9(2) ο€­ οƒ· ο€­  9(ο€­1) ο€­
οƒ·οƒΊ
P(ο€­1 ο€Ό X ο€Ό 2) ο€½ οƒͺ9 x ο€­ οƒΊ
οƒͺ
3οƒΈ 
3 
36 
3  ο€­1 36 
1  46
26 οƒΆ 2
ο€½  ο€­ο€­ οƒ· ο€½
36  3
3οƒΈ 3
(b) For any CONTINUOUS distribution, P(X = a) = 0
P(X = 2) = 0
In S1, the cumulative distribution
function (cdf) F(x0) was defined as
P(X ≀ x0) for discrete random variables.
For continuous random variables, you
can find the cdf by integrating the pdf.
Similarly, you can find the pdf from the
cdf by differentiating.
Probability Density
Function (pdf)
f(x)
Cumulative Distribution
Function (cdf)
F(x)
Example 4
𝑓 π‘₯ =
1
2
π‘₯βˆ’ 3
π‘“π‘œπ‘Ÿ 3 ≀ π‘₯ ≀ 5
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
is a pdf.
Find the cumulative distribution function.
𝐹 π‘₯ =
0
π‘₯<3
x 2 3x 9
ο€­ 
3ο‚£ x ο‚£5
4 2 4
1
π‘₯>5
2
2
2

1
x
3

οƒΆ

οƒΆοƒΉ
1
1 x
οƒΉ
3 2 (x ο€­ 3)dx ο€½ 2 οƒͺ 2 ο€­ 3x  ο€½ 2 οƒͺ 2 ο€­ 3x οƒ·οƒΈ ο€­  2 ο€­ 3(3) 
3
x
x
1  x2
9 οƒΉ x 2 3x 9
ο€½ οƒͺ ο€­ 3x ο€­ ο€­ οƒΊ ο€½ ο€­ 
2 2
2
4 2 4
Example 5
𝐼𝑓 𝐹 π‘₯ =
0
1 2
π‘₯
9
1
π‘₯≀0
0 ≀π‘₯ ≀3
π‘₯>3
dF (x)
f (x) ο€½
dx
𝑓 π‘₯ =
2
ο€½ x
9
2
x 0ο‚£ x ο‚£3
9
0
otherwise
find f(x)
The mean or expected value of a discrete probability distribution is
defined as:
ΞΌ = E(X) = Ξ£px
For a continuous random variable:
𝝁=𝑬 𝑿 =
∞
𝒙𝒇
βˆ’βˆž
𝒙 𝒅𝒙
where in practice, the limits will be the interval over which f(x) is
defined.
Example 6
1
2
𝑓 π‘₯ =
π‘₯βˆ’ 3
0
3≀π‘₯ ≀5
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
Find E(X)
5
𝐸 𝑋 =
5
π‘₯𝑓 π‘₯ 𝑑π‘₯
=
3
3
5
1 2
π‘₯ βˆ’ 3π‘₯ 𝑑π‘₯
2
1  53 3(5)2 οƒΆ  33 3(3)2 οƒΆοƒΉ
1  x 3x οƒΉ
ο€½ οƒͺ ο€­
 ο€­
οƒ·οƒΊ
ο€½ οƒͺ ο€­
οƒΊ
2 οƒΈ 3
2 
2 3
2  3 2  3
3
2
1 25 27 οƒΉ 13
ο€½
ο€½
ο€­ο€­
3
2 οƒͺ 6
6 
For a discrete random variable, variance, Var(X) = Οƒ2 = E(X2) – ΞΌ2
For a continuous random variable,𝑬 π‘ΏπŸ =
∞ 𝟐
𝒙 𝒇
βˆ’βˆž
𝒙 𝒅𝒙
Example 7
Find the standard deviation for
𝑓 π‘₯ =
𝐸
𝑋2
1
2
0
π‘₯βˆ’ 3
5
π‘₯2𝑓
=
3
3≀π‘₯ ≀5
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
5
π‘₯ 𝑑π‘₯ =
3
1 3
π‘₯ βˆ’ 3π‘₯ 2 𝑑π‘₯
2
1  54 3 οƒΆ  34 3 οƒΆοƒΉ
ο€½ οƒͺ ο€­ 5 οƒ· ο€­  ο€­ 3 οƒ·οƒΊ ο€½ 19
2  4
οƒΈ 4

2
2
13

οƒΆ
2
2
Var(X) = E(X ) – ΞΌ ο€½ 19 ο€­  οƒ· ο€½
9
3οƒΈ
2
2
Standard Deviation ο€½
ο€½
9
3
5
1 x
3οƒΉ
ο€½ οƒͺ ο€­x οƒΊ
2 4
3
4
*
Example 8
The continuous random variable, X, has probability density function
π‘˜π‘₯ 0 ≀ π‘₯ ≀ 5
𝑓 π‘₯ =
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
(a)
Find the value of k
(b)
Find the mean and variance of X.
(c)
Calculate
i
P(X > ΞΌ)
ii
P(X > ΞΌ + Οƒ)
5
10
2
(
c
)
i
P
(
X
ο€Ύ

)
ο€½
(b) E ( X ) ο€½
(a) k ο€½
9
3
25
25
2
ii P( X ο€Ύ    ) ο€½ 0.1857
E(X ) ο€½
2
25
Var ( X ) ο€½
18
Example 9
The continuous random variable Y has probability density function
𝑦
π‘“π‘œπ‘Ÿ 0 ≀ 𝑦 ≀ 1
𝑓 𝑦 = 2 βˆ’ 𝑦 π‘“π‘œπ‘Ÿ 1 ≀ 𝑦 ≀ 2
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
Find the mean and variance of Y.
1
7
2
Var (Y ) ο€½
E (Y ) ο€½
E (Y ) ο€½ 1
6
6
Example 10
The continuous random variable X has probability density function
𝑓 π‘₯ =
(a)
(b)
1
36
9 βˆ’ π‘₯2
βˆ’3≀π‘₯ ≀3
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
Find the mean and variance of X.
Calculate
i
P(X > 2)
(a) E ( X ) ο€½ 0
E(X 2 ) ο€½
(b) i P( X ο€Ύ 2) ο€½
2
27
9
5
Var ( X ) ο€½
ii
P(|X| > Οƒ)
9
5
ii P(| X |ο€Ύ  ) ο€½ P( X ο€Ύ  )  P( X ο€Ό  ) ο€½ 0.374
Example 11
The weekly petrol consumption, in hundreds of litres, of a sales
representative may be modelled by the random variable X with
probability density function
2 (𝑏 βˆ’ π‘₯)
π‘Žπ‘₯
0≀π‘₯ ≀2
𝑓 π‘₯ =
0
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
(a)
Find the values of a and b if the mean consumption is 144 litres.
(b)
Find the standard deviation of the weekly petrol consumption.
3
(a) a ο€½
bο€½4
20
(b)  ο€½ 0.408 ο€½ 40.8litres
The mode of a continuous random variable is the value of x for
which f(x) is a maximum over the interval in which f(x) exists.
This is either a stationary point, at which f ’(x) = 0, or the end value
of the interval over which f(x) is defined.
There may not be a mode if no single value occurs more often that
any other. (Bimodal distributions do occur commonly in real life).
Example 12
𝑓 π‘₯ =
1
36
0
9 βˆ’ π‘₯2
βˆ’3≀π‘₯ ≀3
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
x
d 1
2 οƒΉ
ο€½0

9ο€­x  ο€½ ο€­

18
dx οƒͺ 36
This lies in the range - 3 ο‚£ x ο‚£ 3
So the mode ο€½ 0
xο€½0
Find the mode.
Example 13
𝑓 π‘₯ =
1
2
π‘₯βˆ’ 3
0
f (3) ο€½ 0
3≀π‘₯ ≀5
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
f (5) ο€½ 1
Maximum value of f(x) is when x ο€½ 5
Mode ο€½ 5
Find the mode
You can use the cumulative distribution function to find the median
and quartiles for a continuous random variable:
If m is the median, then F(m) = 0.5
If Q1 is the lower quartile then F(Q1) = 0.25
If Q3 is the upper quartile then F(Q3) = 0.75
You can set up an appropriate algebraic equation and solve it to find
the required quartile, decile or percentile.
Example 14
𝑓 π‘₯ =
Find
1
2
0
π‘₯βˆ’ 3
3≀π‘₯ ≀5
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
(a)
(b)
the median
the lower and upper quartiles for X.
x
x
2
1
1  x 2
οƒΆ  32
οƒΆοƒΉ
1 x
οƒΉ
(a) F ( X ) ο€½  (x ο€­ 3)dx ο€½ οƒͺ ο€­ 3x οƒΊ ο€½ οƒͺ ο€­ 3x οƒ· ο€­  ο€­ 3(3) οƒ·οƒΊ
2
2 2
οƒΈ 2

 3 2  2
3
1  x2
9 οƒΉ x 2 3x 9
ο€½ οƒͺ ο€­ 3x ο€­ ο€­ οƒΊ ο€½ ο€­ 
2 2
2
4 2 4
Median is when F(X)=0.5
x 2 3x 9 1
2
x
ο€­ 6x  7 ο€½ 0
ο€­  ο€½
4 2 4 2
x ο€½ 3  2 ο€½ 4.41 ο€½ median
Example 14
𝑓 π‘₯ =
1
2
π‘₯βˆ’ 3
0
3≀π‘₯ ≀5
π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’
Find
(a)
the median
(b)
the lower and upper quartiles for X.
Q3 is when F(X) = 0.75
(b) Q1 is when F(X) = 0.25
x 2 3x 9 1
ο€­  ο€½
4 2 4 4
x2 ο€­ 6x  8 ο€½ 0
(x ο€­ 2)(x ο€­ 4) ο€½ 0
Q1 ο€½ 4
x 2 3x 9 3
ο€­  ο€½
4 2 4 4
x2 ο€­ 6x  6 ο€½ 0
Q3 ο€½ 3  3 ο€½ 4.73
If you were asked for the SHAPE of the distribution or the SKEW…
Q1 ο€½ 4
Q2 ο€½ 4.41
Q2 – Q1 = 0.41
Q3 – Q2 = 0.32
Q2 – Q1 > Q3 – Q2
Negative Skew
Q3 ο€½ 4.73
Related documents