PSLP
4rd SEMESTER
BS-202
Department of Applied Science, BVCOE New Delhi Subject: PSLP
1
UNIT-2
Department of Applied Science, BVCOE New Delhi Subject: PSLP
2
Moment Generating Functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
3
Continuous Distributions
The Uniform distribution from a to b
Department of Applied Science, BVCOE New Delhi Subject: PSLP
4
The Normal distribution �(mean μ, standard deviation σ)
Department of Applied Science, BVCOE New Delhi Subject: PSLP
5
The Exponential distribution
Department of Applied Science, BVCOE New Delhi Subject: PSLP
6
Weibull distribution with parameters α and β.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
7
The Weibull density, f(x)
(α = 0.5, β = 2)
(α = 0.7, β = 2)
(α = 0.9, β = 2)
Department of Applied Science, BVCOE New Delhi Subject: PSLP
8
The Gamma distribution
Let the continuous random variable X have density function:
Then X is said to have a Gamma distribution with parameters α and λ.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
9
Expectation of functions of Random Variables
Department of Applied Science, BVCOE New Delhi Subject: PSLP
10
X is discrete
X is continuous
Department of Applied Science, BVCOE New Delhi Subject: PSLP
11
Moments of Random Variables
Department of Applied Science, BVCOE New Delhi Subject: PSLP
12
The kth moment of X.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
13
the kth central moment of X
where μ = μ1 = E(X) = the first moment of X .
Department of Applied Science, BVCOE New Delhi Subject: PSLP
14
Some Rules:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
15
Moment generating functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
16
Moment Generating function of a R.V. X
Department of Applied Science, BVCOE New Delhi Subject: PSLP
17
Examples
Department of Applied Science, BVCOE New Delhi Subject: PSLP
18
The moment generating function of X , mX(t) is:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
19
The moment generating function of X , mX(t) is:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
20
The moment generating function of X , mX(t) is:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
21
We will now use the fact that
We have completed the square
This is 1
Department of Applied Science, BVCOE New Delhi Subject: PSLP
22
The moment generating function of X , mX(t) is:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
23
We use the fact
Equal to 1
Department of Applied Science, BVCOE New Delhi Subject: PSLP
24
Properties of� Moment Generating Functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
25
Note: the moment generating functions of the following distributions satisfy the property mX(0) = 1
Department of Applied Science, BVCOE New Delhi Subject: PSLP
26
We use the expansion of the exponential function:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
27
Now
Department of Applied Science, BVCOE New Delhi Subject: PSLP
28
Property 3 is very useful in determining the moments of a random variable X.
Examples
Department of Applied Science, BVCOE New Delhi Subject: PSLP
29
Department of Applied Science, BVCOE New Delhi Subject: PSLP
30
To find the moments we set t = 0.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
31
Department of Applied Science, BVCOE New Delhi Subject: PSLP
32
Department of Applied Science, BVCOE New Delhi Subject: PSLP
33
The moments for the exponential distribution can be calculated in an alternative way. This is note by expanding mX(t) in powers of t and equating the coefficients of tk to the coefficients in:
Equating the coefficients of tk we get:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
34
The moments for the standard normal distribution
We use the expansion of eu.
We now equate the coefficients tk in:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
35
If k is odd: μk = 0.
For even 2k:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
36
Summary
Moments
Moment generating functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
37
Moments of Random Variables
The moment generating function
Department of Applied Science, BVCOE New Delhi Subject: PSLP
38
Examples
Department of Applied Science, BVCOE New Delhi Subject: PSLP
39
Department of Applied Science, BVCOE New Delhi Subject: PSLP
40
(α = ν/2, λ = 1/2)
Department of Applied Science, BVCOE New Delhi Subject: PSLP
41
Properties of Moment Generating Functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
42
Let lX (t) = ln mX(t) = the log of the moment generating function
The log of Moment Generating Functions
Department of Applied Science, BVCOE New Delhi Subject: PSLP
43
Thus lX (t) = ln mX(t) is very useful for calculating the mean and variance of a random variable
Department of Applied Science, BVCOE New Delhi Subject: PSLP
44
Examples
Department of Applied Science, BVCOE New Delhi Subject: PSLP
45
Department of Applied Science, BVCOE New Delhi Subject: PSLP
46
Department of Applied Science, BVCOE New Delhi Subject: PSLP
47
Department of Applied Science, BVCOE New Delhi Subject: PSLP
48
Department of Applied Science, BVCOE New Delhi Subject: PSLP
49
Department of Applied Science, BVCOE New Delhi Subject: PSLP
50
Department of Applied Science, BVCOE New Delhi Subject: PSLP
51
Department of Applied Science, BVCOE New Delhi Subject: PSLP
52
Box and Whisker Plots
Department of Applied Science, BVCOE New Delhi Subject: PSLP
53
Order numbers
3, 5, 4, 2, 1, 6, 8, 11, 14, 13, 6, 9, 10, 7
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
54
Median
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
55
Median (continued):
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
Add those 2 middle numbers together:
6 + 7 = 13
13 ÷ 2 = 6.5
Department of Applied Science, BVCOE New Delhi Subject: PSLP
56
Quartiles (page 1)
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1, 2, 3, 4, 5, 6, 6, │7, 8, 9, 10, 11, 13, 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
57
Quartiles (page 2)
1, 2, 3, 4, 5, 6, 6, │7, 8, 9, 10, 11, 13, 14
1, 2, 3, 4, 5, 6, 6 │ 7, 8, 9, 10, 11, 13, 14
1, 2, 3, 4, 5, 6, 6 │ 7, 8, 9, 10, 11, 13, 14
Left Right
Median = 4 Median = 10
Department of Applied Science, BVCOE New Delhi Subject: PSLP
58
Quartiles (page 3)
1, 2, 3, 4, 5, 6, 6 │ 7, 8, 9, 10, 11, 13, 14
Left Right
Median = 4 Median = 10
Department of Applied Science, BVCOE New Delhi Subject: PSLP
59
Number line
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
60
Quartiles on number line
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
61
Box on Quartiles on number line
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
62
Median on number line
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
63
Median on number line
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
64
Low and high numbers
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
65
Low and high numbers
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 13, 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Department of Applied Science, BVCOE New Delhi Subject: PSLP
66
Box and Whisker Plot
3, 5, 4, 2, 1, 6, 8, 11, 14, 13, 6, 9, 10, 7
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Here is the completed Box and Whisker Plot!
Department of Applied Science, BVCOE New Delhi Subject: PSLP
67
Ques. The number of books taken out of the library per month by first year students from a sample of 15 is as follows: 3, 0, 12, 0, 2, 0, 26, 0, 7, 5, 5, 2, 1, 1, 2.
The number of books taken out of the library per month by third year students from a sample of 15 is as follows: 12, 0, 9, 4, 15, 2, 6, 10, 27, 15, 5, 9, 1, 14, 2.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
68
Question?
The number of books taken out of the library per month by first year students from a sample of 15 is as follows: 3, 0, 12, 0, 2, 0, 26, 0, 7, 5, 5, 2, 1, 1, 2.
The number of books taken out of the library per month by third year students from a sample of 15 is as follows: 12, 0, 9, 4, 15, 2, 6, 10, 27, 15, 5, 9, 1, 14, 2.
Solution:
First of all start by ordering the data.�The number of books taken out of the library per month by first year students from a sample of 15 is as follows:0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 5, 5, 7, 12, 2.
The number of books taken out of the library per month by third year students from a sample of 15 is as follows:0, 1, 2, 2, 4, 5, 6, 9, 9, 10, 12, 14, 15, 15, 27.
For first year students the data is as follows:�Sample size: 15�Median: 2�Minimum value: 0�Maximum value: 26�First quartile: 0�Third quartile: 5�Interquartile Range: 5�Outliers: 26�For third year students the data is as follows:�Sample size: 15�Median: 9�Minimum value 0�Maximum value: 27�First quartile: 2�Third quartile: 14�Interquartile Range: 12�Outliers: none.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
69
Solution:
For first year students the data is as follows:�Sample size: 15�Median: 2�Minimum value: 0�Maximum value: 26�First quartile: 0�Third quartile: 5�Interquartile Range: 5�Outliers: 26�For third year students the data is as follows:�Sample size: 15�Median: 9�Minimum value 0�Maximum value: 27�First quartile: 2�Third quartile: 14�Interquartile Range: 12�Outliers: none.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
70
Covariance and Correlation
71
Department of Applied Science, BVCOE New Delhi Subject: PSLP
72
Department of Applied Science, BVCOE New Delhi Subject: PSLP
73
As an example, take g(x, y) = xy for discrete random variables X and Y with
the joint probability distribution given in the table. The expectation of XY is computed as follows:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
74
Department of Applied Science, BVCOE New Delhi Subject: PSLP
75
Proof that E[X + Y] = E[X] + E[Y]:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Var(X + Y) is generally not equal to Var(X) + Var(Y)
76
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Department of Applied Science, BVCOE New Delhi Subject: PSLP
77
If Cov(X,Y) > 0 , then X and Y are positively correlated.
If Cov(X,Y) < 0, then X and Y are negatively correlated.
If Cov(X,Y) =0, then X and Y are uncorrelated.
78
Department of Applied Science, BVCOE New Delhi Subject: PSLP
79
Now let X and Y be two independent random variables.
Then Cov(X, Y ) = E[XY ] − E[X]E[Y ] = 0.
Hence, then X and Y are uncorrelated.
We proved that if X and Y are two independent random variables,
then they are uncorrelated.
In general, E[XY] is NOT equal to E[X]E[Y].
INDEPENDENT VERSUS UNCORRELATED.
If two random variables X and Y are independent, then X and Y are uncorrelated.
The converse is not true as we will see on the next slide.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
80
Here, Cov =0 but P (X, Y) not equals P(X). P(Y). Events are not independent.
Then Cov(X, Y ) = E[XY ] − E[X]E[Y ] = 0 and X and Y are uncorrelated,�but they are dependent.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
The variance of a random variable with a Bin(n,p) distribution:
81
Department of Applied Science, BVCOE New Delhi Subject: PSLP
The covariance changes under a change of units
The covariance Cov(X,Y) may not always be suitable to express the dependence between X and Y. For this reason, there is a standardized version of the covariance called the correlation coefficient of X and Y, which remains unaffected by a change of units and, therefore, is dimensionless.
82
Department of Applied Science, BVCOE New Delhi Subject: PSLP
83
Department of Applied Science, BVCOE New Delhi Subject: PSLP
84
Correlation coefficient is also called Pearson correlation coefficient.
(from Wikipedia) Examples of scatter diagrams with different values of correlation coefficient.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
85
(from Wikipedia) Several sets of (x, y) points, with the correlation coefficient of x and y for each set. Note that the correlation reflects the non-linearity and direction of a linear relationship (top row), but not the slope of that relationship (middle), nor many aspects of nonlinear relationships (bottom). N.B.: the figure in the center has a slope of 0 but in that case the correlation coefficient is undefined because the variance of Y is zero.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
SUMMARY:
86
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Covariance:�
87
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Where Xi and Yi are individual data points, a and b are the means of X and Y respectively, and
N is the number of data points.
88
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Correlation
89
Department of Applied Science, BVCOE New Delhi Subject: PSLP
cor(X,Y)=cov(X,Y)/σX⋅σY
Where, cov(X,Y) is the covariance between X and Y, and σX and σY are the standard deviations of X and Y respectively.
σX= square root [(Xi-a)^2/n], a=mean of Xi
NOTE: While covariance and correlation both describe the relationship between variables, correlation is a more useful measure because it's standardized and provides a clear indication of the strength and direction of the relationship.
90
Department of Applied Science, BVCOE New Delhi Subject: PSLP
��CENTRAL LIMIT THEOREM
Department of Applied Science, BVCOE New Delhi Subject: PSLP
91
The Central Limit Theorem describes the properties of the following two quantities as n gets larger
The sample mean or average of a random sample of size n:
The sum or total of the sample of size n:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
92
Let’s take an example:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
93
17 18 18 18 19 19 19 19
20 20 20 20 20 20 20 20
20 20 21 21 21 21 21 21
21 21 21 21 22 22 22 22
22 22 22 22 22 23 23 23
23 23 24 24 24 24 24 25
25 25 26 26 27 27 29 29
30 32 32 33 33 34 38 43
50
Samples
Department of Applied Science, BVCOE New Delhi Subject: PSLP
94
17 18 18 18 19 19 19 19
20 20 20 20 20 20 20 20
20 20 21 21 21 21 21 21
21 21 21 21 22 22 22 22
22 22 22 22 22 23 23 23
23 23 24 24 24 24 24 25
25 25 26 26 27 27 29 29
30 32 32 33 33 34 38 43
50
Sample of Size 1
Department of Applied Science, BVCOE New Delhi Subject: PSLP
95
17 18 18 18 19 19 19 19
20 20 20 20 20 20 20 20
20 20 21 21 21 21 21 21
21 21 21 21 22 22 22 22
22 22 22 22 22 23 23 23
23 23 24 24 24 24 24 25
25 25 26 26 27 27 29 29
30 32 32 33 33 34 38 43
50
Another Sample of Size 1
Department of Applied Science, BVCOE New Delhi Subject: PSLP
96
17 18 18 18 19 19 19 19
20 20 20 20 20 20 20 20
20 20 21 21 21 21 21 21
21 21 21 21 22 22 22 22
22 22 22 22 22 23 23 23
23 23 24 24 24 24 24 25
25 25 26 26 27 27 29 29
30 32 32 33 33 34 38 43
50
Central Limit Theorem
Department of Applied Science, BVCOE New Delhi Subject: PSLP
No matter the shape of the population, the distribution of x-bars tends toward Normality
97
8-98
Example
Suppose that the mean time for an oil change at an oil change joint is 11.4 minutes with a standard deviation of 3.2 minutes.
(b) If a random sample of n = 35 oil changes is selected, what is the probability the mean oil change time is less than 11 minutes?
Department of Applied Science, BVCOE New Delhi Subject: PSLP
8-99
Example
Suppose that the mean time for an oil change at a “10-minute oil change joint” is 11.4 minutes with a standard deviation of 3.2 minutes.
Solution: is approximately normally distributed
with mean = 11.4 and std. dev. = .
Department of Applied Science, BVCOE New Delhi Subject: PSLP
8-100
Example
Suppose that the mean time for an oil change at a “10-minute oil change joint” is 11.4 minutes with a standard deviation of 3.2 minutes.
(b) If a random sample of n = 35 oil changes is selected, what is the probability the mean oil change time is less than 11 minutes?
Solution: is approximately normally distributed
with mean = 11.4 and std. dev. = .
Solution: , P(Z < –0.74) = 0.23.
Department of Applied Science, BVCOE New Delhi Subject: PSLP
Another Example:
Department of Applied Science, BVCOE New Delhi Subject: PSLP
101