280 likes | 412 Views
Statistics and Mathematics for Economics. Statistics Component: Lecture Six. Objectives of the Lecture. To supply a distinction between a discrete and a continuous random variable To provide examples of the probability density function of a continuous random variable
E N D
Statistics and Mathematics for Economics Statistics Component: Lecture Six
Objectives of the Lecture • To supply a distinction between a discrete and a continuous random variable • To provide examples of the probability density function of a continuous random variable • To outline an approach towards calculating the probability that the value of a continuous random variable lies within a specified range of values • To indicate how to calculate the expected value and the value of the variance of a continuous random variable
A Discrete Random Variable • A distinguishing feature of a discrete random variable is that it can be equal to only a finite or countably infinite number of values • The earliest example which was given of a discrete random variable was the number which is obtained following a single throw of a dice
Diagrammatic Presentation of the Probability Distribution of X P(X) 1/6 0 1 2 3 4 5 6 X
Modification of the Probability Distribution 0 1 2 3 4 5 6 X
Continuous Random Variable • X is now fulfilling the role of a continuous random variable • A distinguishing feature of a continuous random variable is that, between any two specified values, the variable can be equal to an infinite number of values • Examples are the height, weight, width and length of an object, the speed at which an object is travelling, and the distance of an object from a specified location
A Feature of the Graph Area underneath the graph = 1 0 1 2 3 4 5 6 x
The Probability Density • If the area underneath the graph is equal to 1 then it is possible to work out the height of the rectangle • The area of a rectangle = height x width • Therefore, 1 = height x (6 – 1) • So, height = 1/5 • The height of the rectangle is not the probability, but, rather, the probability density, f(x) • A continuous random variable does not have a probability distribution but, rather, a probability density function
The Probability Density Function of X Mathematical presentation of the function: f(x) = 1/5, 1 < x < 6, f(x) = 0, otherwise.
The Probability of Interest • In the case of a continuous random variable, the probability that the variable is equal to any individual value is (approximately) equal to zero • Hence, the concern tends to be with the probability that the value of the variable lies within a specified range of values • This probability is equal to the area underneath the graph between the corresponding points on the horizontal axis
The Probability that the Value of X Falls between 1 and 2 The probability that the value of X lies between 1 and 2 is equal to the area of the shaded region. The height x the width = 1/5 x (2 – 1) = 1/5. f(x) = 1/5 0 1 2 3 4 5 6 x
Mathematical Approach • This probability can also be obtained mathematically, • using the technique of integration. • Two fundamental rules of integration: • The consequence of integrating a constant (k) with • respect to X is kX; • (ii) The consequence of integrating kXn with respect to X • is kXn+1/(n+1).
Mathematical Calculation When X is a discrete random variable: P(X = 1 or 2) = P(X = x). When X is a continuous random variable: 2 P(1 < X < 2) = f(x).dx, 1 where dx denotes a small change in the value of X. Upon substitution: 2 P(1 < X < 2) = (1/5)dx 1
Evaluation of the Integral 2 P(1 < X < 2) = (1/5)dx 1 2 = [x/5] 1 = (2/5) – (1/5) = 1/5
Calculation of the Expected Value of X The probability density function of X is symmetrical. Hence, the expected value of the variable corresponds to the mid-point along the horizontal axis (= (6 + 1)/2 = 3.5)). This result can be confirmed mathematically using integration. When X is a discrete random variable: E[X] = x.P(X = x) When X is a continuous random variable: E[X] = x.f(x).dx - In the current example: 6 E[X] = x.(1/5).dx 1
Result for the Expected Value Upon integrating x/5, with respect to x, we achieve x2/10. Hence: 6 E[X] = [x2/10] 1 = (36/10) - (1/10) = 35/10 units
Calculation of the value of the variance of X var.(X) = E[X2] - (E[X])2 E[X2] = x2.f(x).dx - Upon substitution: 6 E[X2] = x2(1/5)dx 1 Upon integrating x2/5, with respect to x, we achieve x3/15.
Result for the value of the variance 6 E[X2] = [x3/15] 1 = (216/15) - (1/15) = 215/15 units squared Consequently, var.(X) = 215/15 - (7/2)2 = 43/3 - 49/4 = 25/12 units squared
Second Example of the Probability Density Function of a Continuous Random Variable f(x) 0 2 4 6 X
Attempting to achieve a mathematical presentation Assign to the maximum probability density the arbitrary constant, c. Consequently, f(x) = c, 2 < x < 4. The first element of the probability density function has the diagrammatic appearance of an upward-sloping straight line. Thus, mathematically, it complies with the general equation of a straight line: f(x) = a + bx, 0 < x < 2. It can be shown that, more specifically: f(x) = cx/2, 0 < x < 2.
The third element of the probability density function The third element of the probability density function has the diagrammatic appearance of a downward-sloping straight line. Hence, mathematically, it complies with the general equation of a straight line: f(x) = a + bx, 4 < x < 6. It can be shown that, more specifically: f(x) = 3c - cx/2, 4 < x < 6.
Determining the value of c The value of the constant, c, can be determined using one of the properties of the probability density function of a continuous random variable. Over the possible values of the random variable, the sum of the probabilities is equal to one: f(x).dx = 1. - In the case of the current probability density function: 6 f(x).dx = 1. 0
Decomposition of the integral The single integral may be expressed as the sum of three separate integrals: 6 2 4 6 f(x).dx = f(x).dx + f(x).dx + f(x).dx = 1 0 0 2 4 Upon substitution: 6 2 4 6 f(x).dx = (cx/2)dx + c.dx + (3c – cx/2)dx = 1 0 0 2 4 2 4 6 = [cx2/4] + [cx] + [3cx – cx2/4] = 1 0 2 4
Evaluating the integrals (c – 0) + (4c – 2c) + (18c – 9c) – (12c – 4c) = 1 So, 4c = 1, such that c = ¼. Mathematical form of the probability density function: f(x) = x/8, 0 < x < 2; f(x) = ¼, 2 < x < 4; f(x) = ¾ - x/8, 4 < x < 6.
Calculation of the Expected Value of the Random Variable 6 E[X] = x.f(x).dx 0 The single integral may be expressed as the sum of three separate integrals: 2 4 6 E[X] = x.f(x).dx + x.f(x).dx + x.f(x).dx 0 2 4 Upon substitution: 2 4 6 E[X] = x(x/8)dx + x(1/4)dx + x(3/4 – x/8)dx 0 2 4
Evaluating the integrals 2 4 6 E[X] = (x2/8)dx + (x/4)dx + (3x/4 – x2/8)dx 0 2 4 2 4 6 E[X] = [x3/24] + [x2/8] + [3x2/8 - x3/24] 0 2 4 E[X] = (8/24 – 0) + (16/8 - 4/8) + (108/8 – 216/24) - (48/8 – 64/24) = 8/24 + 12/8 + 60/8 - 152/24 = -144/24 + 72/8 = 3
Calculating the value of the variance of the random variable var.(X) = E[X2] - (E[X])2, 6 where E[X2] = x2.f(x).dx. 0 The single integral may be presented as the sum of three separate integrals: 2 4 6 E[X2] = (x3/8)dx + (x2/4)dx + (3x2/4 - x3/8)dx. 0 2 4
Evaluating the integrals 2 4 6 E[X2] = [x4/32] + [x3/12] + [3x3/12 - x4/32] 0 2 4 E[X2] = (16/32 – 0) + (64/12 – 8/12) + (648/12 – 1296/32) - (192/12 – 256/32) E[X2] = 16/32 + 56/12 + 456/12 - 1040/32 = -1024/32 + 512/12 = -128/4 + 128/3 = 128/12 units squared Thus, var.(X) = 128/12 - 32 = 20/12 = 5/3 units squared