Lec 25

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Modelling & Simulation of Discrete Event Systems

Prof. Dr. Pradeep K Jha


Department of Mechanical and Industrial Engineering
Indian Institute of Technology, Roorkee

Lecture – 25
Problem Solving on Input Modeling

Welcome to the lecture on problem solving on input modelling. So, we have studied few
things about the input modelling. We have studied about the joint distribution variables.
We have studied about the uniformity in independence. So, check; so, we have discussed
many questions, and in this lecture, we will discuss about different kinds of problems
whatever we can, so that we will have some more exposure to the problem solving.

(Refer Slide Time: 00:53)

Dealing with the first question, where the X and Y are jointly discrete random variables,
and the p x y is defined as x plus y by 30, for x equal to 0, 1 and 2. So, you have discrete
values of x as 0 1 2, and the y values are for 0, 1, 2 and 3. And p x y is 0 otherwise. So,
we have check that whether X and Y are independent or not. For that as we have
understood that the condition is that p x y should be equal to p x x into p y y. And if that
is coming in that case X and Y can be said to be independent otherwise not. So, let us
compute whether p x x is equal to p y y.
(Refer Slide Time: 01:55)

So, in this case what we see is; so, we have the question as p x y as x plus y upon 30.
And x is 0 1 and 2 and y is 0 1 2 and 3. So, these are the values and it is 0 otherwise.

Now, p x x we will find. So, p x x will be, it will be for all y, p x y. So, that is for all y y
equal to 0 to 3, it will be x plus y upon 30. So, it will be x by 30 plus 0 plus x by 30 plus
1 plus x by 30. So, x plus 0 by 30 plus x plus 1 by 30 plus x plus 2 by 30 plus x plus 3 by
30. So, you have 4 terms, and that is why it will be 4 x and then 1 plus 2 plus 3. So, 6 by
30. So, it will be equal to 2 x plus 3 by 15. Now we get p y y, p y y will be summation
for all x, p x y. So, here you have the values of x as 0 to 2; you have discrete value 1 and
2 and in that case, you have x plus y by 30. So, it will be once 0. So, it will be y plus 30
by y plus 1 by 30 plus y plus 2 by 30, 3 times, 3 terms will be added. So, it will be 3 y
plus 3 by 30. So, it will be y plus 1 by 10. Now we find p x x into p y y. So, p x x into p
y y, if you do the multiplication, it will be 2 x plus 3 into y plus 1 by 15 into 10.

So, it will be 2 x y plus 3 y plus 2 x plus 3 by 150. So, what we see is this is not equal to
x plus y by 30; it means p x x into p y y is not equal to p x y. So, X and Y are not so, they
are not you know they are not independent. So, this is how you solve this discrete
distribution joint distribution function.
(Refer Slide Time: 05:44)

Next question is that you have X and Y as joint continuous random variables with f x y
equal to y minus x, for x varying from 0 to 1 and y varying from 1 to 2, and it is 0
otherwise. So, we have to see whether X and Y are independent, and we have to compute
E X variance X E Y variance Y covariance of X Y and correlation X Y. So, these things
are to be computed. Now so, this question is, question 2 is f x y equal to y minus x is it is
given for 0 to 1 for x as 0 to 1, and y is varying between 1 to 2. So, this y is varying
between 1 to 2, and it is 0 otherwise. So, we have to find many parameters in that, now
first of all we have to see whether it is dependent or independent. So, for that we have to
find f x x and f y y, and then we have to see whether their multiplication is as same as f x
y. So, then we can say whether it is independent or not. So, it f x x it will be integral f x y
and then it will be d y. So, y varying from 1 to 2. So, it will be y minus x d y integral and
1 to 2. So, it will be y square by 2, minus x y and then it vary between 1 to 2.

So, it will be once we take 2 and 1 as this. So, it will be 4 minus 1, 3 by 2 minus x y. So,
x y means; x into y is 2 and then 1 is 2 minus 1 so x. So, it will be 3 by 2 minus x. X is
where so f x x is 3 by 2 minus x, and x is varying from 0 to 1. Then we have to find f y y,
f y y will be for all d x. So, integral d x, we have to do and x varies from 0 to 1. So, this
will be y minus x d x. It will be f x y d x, and x is varying from 0 to 1. So, it will be y x
minus x square by 2, and x is from 0 to x equal to 1. So, it will be; so, for this it will be y
minus, and for this it will be 1 by 2. So, in this case. So, f y y is we are getting as y minus
1 by 2, 1 to y is varying from 1 to 2. Now for checking the independence, we have to see
that f x x multiplied by f y y, it is coming as 3 by 2 minus x multiplied by y minus 1 by
2. And it is not coming as same as y minus x. So, this is not coming as similar to y minus
x; that is f x y. So, X and Y are said to be not independent.

So, X and Y are not independent. Now we have to compute these values E X, variance X
E Y, variance Y, covariance X Y and correlation X Y.

(Refer Slide Time: 10:54)

Now, we will compute the E X, E X is computed as integral x f x x d x. So, it will be x f


x x we have computed as 3 by 2 minus x. So, x into 3 by 2 minus x d x and it will be
from x is varying from 0 to 1. So, it will be 3 by 2 x. So, 3 by 2 x square by 2, minus x
square. So, x cube by 3, and x is varying from 0 to 1. So, it will be 3 by 4 minus 1 by 3.
So, it will be 5 by 12. This is the value of expected value of x. Further you have to
calculate E X square, E X square is x square f x d x integral. So, it will be integral x
square f x d x. So, this will be coming as integral x square into 3 by 2 minus x d x. So, it
will be 3 by 2 x x square. So, x cube by 3 minus x 4 x cube. So, x 4 by 4, and x is
varying from 0 to 1. So, this value will be 1 by 2 minus this value will be 1 by 4. So, it
will be 1 by 4.

Next you have variance X. Variance X will be e raise to the E X square minus E X
square whole square this is what the meaning of variances. So, E X square we have
computed as 1 by 4, minus E X whole square will be 5 by 12 square. So, it will be 25 by
144. So, it will be 36 minus 25 by 144, it will be 11 by 144. Then we have to compute E
Y. E Y will be integral y f y y d y. So, it will be y is varying from 1 to 2. So, it will be 1
to 2, y into f y y is basically y minus 1 by 2 d y. So, it will be y square d y; that is y cube
by 3 minus half y d y. So, half into y square by 2. So, y square by 4. In fact, and y is
between 1 and 2. So, this value will be 8 minus 1, 7 by 3 minus again y square by 4. So,
4 minus 1 3 by 4. So, this will be 19 upon 12.

Now, next is E Y square. E Y square will be again integral 1 to 2 y square f y y d y. So, it


will be again y square into y minus 1 by 2 d y 1 to 2. So, this will be equal to y cube d y.
So, y 4 by 4, 0 1 to 2 minus y square by 2 d y. So, y cube by 3 into 2. And this will be
again 1 to 2. So, this will be 2 raise to the power 4; that is 16 minus 1 15 by 4, minus 2
raise to the power 3. So, 8 minus 17 by 6. So, it will be equal to 31 by 12.

So, it will be basically 45 minus 21. So, this is nothing but this is 12 is here. And you
will get 45 minus this is 14. So, 45 minus 14 is 31 by 12. Next is you have to compute
variance Y. Variance Y will be computed as again E Y square minus E Y whole square.
So, it will be E of Y square minus E Y whole square. So, it will be 31 by 12 minus E Y
square. So, it will be 361 by 144. So, it will be 372 minus 361 by 144, 11 by 144. Now
we have to find E X Y, we when we try to compute the covariance. In that case we need
E X Y. So, E X Y will be integral x y f x y d x d y. So, you have double integral. x is
varying from 0 to 1 and y is varying from 1 to 2. Now in that case what we see is; it will
be x y into y minus x d x d y and double integral 0 to 1 and 1 to 2.

So, first of all we do for d y and in that case this value will come as x y square. So, x y
cube by 3 minus x square y. So, it will be x square y square by 2, y is varying from 1 to
2, and that value which will come again it will be; integrated between 0 to 1 and then it
will be d x. So, it is value we will write there. So, this will be again. So, once we take 1
to 2, now taking y as 2. So, it will be 8 minus 1 7 x by 3. So, it will be 7 x by 3. Because
this y cube. So, 2 raise to the power 3 minus 1 raise to the power 3. So, 7 x by 3 minus,
again x square into y square. So, 2 raise to the power 2 minus 1 raise to the power 2. So,
it is 3, 3 x square by 2. And it will be d x and x is varying from 0 to 1.

So, that will be again 7 x square by 2. So, it will be 2 into 3 6, minus 3 into 3 by 2 into x
cube by 3. So, it will be x cube by 2. And then x is varying from 0 to 1. So, taking this it
will be 7 by 6, minus 1 by 2. So, 7 by 6 minus 3 by 6 4 by 6 that is 2 by 3. So, we have
got E X Y. So, E X Y we have got as 2 by 3. Now we have to find the covariance. So,
covariance X Y, it is defined as E X Y minus E X E Y. So, we have computed E X and E
Y earlier and E X so, it will be E X Y we have computed as 2 by 3, E X was computed as
5 by 12. And E Y was computed as 19 by 12. So, 2 by 3 minus 95 by 144. So, it will be
96 minus 95 by 144 it is 1 by 144.

So, once we get that we can further get the value of a correlation. So, correlation X Y
will be covariance X Y divided by variance X into; I mean under root variance X into
variance Y or sigma x into sigma y. So, this will be covariance X Y divided by under
root variance X variance Y. So, it will be 1 by 144 divided by under root, variance X is
11 by 144, and variance Y is again also 11 by 144. So, it is 11 by 144 in the bottom, 1 by
forty 144 into 144 by 11. So, it is 1 by 11. So, what we see; that correlation value is
coming out to be 1 by 11.

(Refer Slide Time: 22:42)

So, all these parameters are calculated in this fashion. Next, in next question we will
discuss; the next question is as it is shown that we have to test whether you saw series of
numbers are given. And we have to test whether the third, 8th, 13th and so on, the
numbers of the following sequence whether they are auto correlated. So, here we have to
see whether this third number that is 0.23 after that a gap of 5. So, third then you have
18th that is 0.28 then again 13th, 0.33 then you have 18th. So, that is 0.27 whether they
are auto correlated or not.
So, we have to do the auto correlation test for these numbers. Now for that the test
procedure is that, you have to you know get the value. So, you have to start from third.
So, i equal to 3, and you have to go at the interval of 5, and you have to see that when
you get this number 30. So, basically a an integer M capital M is defined, where here m
is 5 small m is 5. So, in this case in the in this in the data; what we see is you have to
start from the third data and you have to go after the interval of 5.

(Refer Slide Time: 24:15)

So, i is basically you are staring with 3. And you are going with the interval of 5. Now
total number of samples n is basically 30. So, capital M is to defined, as we know the
condition is that i plus M plus1 into m has to be less than equal to 30. You have basically
30 observations n. So, this is the condition, and if you put that in that case this is 3. So, it
will be 27 and by m. So, it will be 5. So, M has to be less than equal to 4, M has to be 4.
So, M is taken as 4. So, M being an integer, you have to take M value as 4. Now as we
know that we have to check the auto correlation. So, in the auto correlation, the rho value
that is it is defined as rho i m. So, rho i is 3 and m is small m is 5. So, this is defined as
we have already discussed it will be 1 by M plus 1, and summation of integral k equal to
0 to m R i plus k m, and into R i plus k plus 1 into m.

So, this way and then minus 0.25 this value you have to find first. So, this value once it is
found, then you are finding the epsilon that is sigma rho i m. And then this sigma rho i m
from there you get the Z nought. So, that variate value you get. And that value has to be
compared to the critical value, from the table. Now this value if you look at m is 4. So,
we have got 5. Now we will start from k equal to 0. So, it will be random number of third
position. So, that is 0.23. So, 0.23 and then this is multiplied by i plus 5 3 plus 0 plus 1.
So, ones into 5. So, random number at 8th position. So, 0.23 multiplied by 8th position
0.28. Then further, next time when x k is taken as 1. So, it will be number at 8th position,
and this will be at 13th position. So, 8th position is 0.28, and 13th position number is
0.33. So, similarly again 0.33 multiplied by again 18th position. So, it will be 0.27, it is
0.27 here. So, it will be 0.27. Then further 0.27 multiplied by; you see again the if you go
to next interval. So, it will be 0.05, and then again 0.05 multiplied by 0.36 this is a last
number; which we get in this because after 0.36, we do not have any number after that
left. And then we are subtracting it with 0.25.

So, this value if you get, it is coming as minus of 0.1945. Now once we go get this rho
estimator for 3 5, then we get sigma rho 3 5. So, that how that is computed as and we
have seen, we have seen a formula that is 13 M plus 7 divided by 12 into M plus 1. So, it
is 13 M plus 7 m is basically 4. So, it will be 13 into 4 plus 7. So, 59 and it is square root
is something close to 7.7 and divided by this is 60. So, it will be a coming to be 0.128.
And the Z naught value is coming out to be rho i m estimator divided by sigma rho i m.
So, this value is coming out to be now. So, that this value rho i m we have calculated
0.25 and this is; so now, this is value as 0.1945 minus divided by 0.128. So, minus 0.945
divided by 0.128, and this is coming out to be minus of 1.516.

Now, the condition is that this value should be in between minus Z alpha by 2 to plus Z
alpha by 2. So, if this is in between them you can take this you cannot reject the null
hypothesis of independence. If this value of Z naught is in between this Z alpha by 2 and
minus Z alpha by 2 and plus Z alpha by 2, then you can say that you cannot reject this
null hypothesis of independence. Now this value is to be calculated; I mean this value is
to be referred by looking at the table for alpha by 2. Now alpha is taken as 0.05 so you
are having a 5 percent of the tolerance. So, once you got to alpha by 2 which it is 2.5
percent. So, it 2.5 percent means, it will be 97.5 percent is the value you have to look
into.
(Refer Slide Time: 31:03)

So, you go to this value, in this table you see the 97.5 value. So, you see here in this case
97.5 will come in this. And you will further go. So, this is 1.95 1.9 plus 0.05. So, it is
1.95, 1.96 is coming out to be 0.975.

Now, what we I mean to say, that this alpha by 2, alpha by 2 basically is coming out to
be 0.025.

(Refer Slide Time: 31:32)

So, it is 2.5 percent. So, you have to go for so tolerance is 2.5 percent. So, you have to go
for 97.5 percent. So, you have to see the value of 0.975 from table for what? So, this is
for what Z variate value. So, that will be Z naught. Now from this looking at this table as
we have seen this 0.975 is for 1.96. So, this value is coming out to be 1.96. Now this
value, this value basically is now this is basically between minus 1.516. So, this value is
Z alpha by 2 basically this Z alpha by 2 basically is minus 1 point. So, this value will be
minus 1.96, and this will be plus 1.96. And this value Z nought, this is coming out to be
minus 1.516. So, this is coming in between that. So, once this is coming in between that,
we can say that using the null hypothesis. We cannot reject the independence for these
samples. So, we can say that this sample looks to be, you know independent.

Thank you.

You might also like