0
   

calculation of variance

 
 
dkch
 
Reply Thu 22 Oct, 2015 06:35 am
QUESTION
The distribution of variable x is Normal with mean = 0 and sd =1; y is such that
for y=1 ; x<= Q1,
for y=2 ; Q1<= x<=Q2,
and for y=3 ; Q2<= x ,
then find the variance of y

I interpreted the problem as follows
If we consider that there exists N values of x arranged in ascending order then we can also consider that
for first N/4 values of x, y= 1,
for next N/4 values of x, y= 2,
and for last N/2 values of x, y= 3,
So we have N/4 no. of 1 , N/4 no. of 2 and N/2 no. of 3 as values of y. This helps the calculation as follows
E(y) = (1.N/4+2.N/4 +3.N/2)/N = 2.25
E(y^2) = (1.N/4+4.N/4 +9.N/2)/N = 5.75
Var(y) =E(y^2) - [(E(y)]^2 = 5.75 - (2.25)^2 =0.6875

Please comment whether the approach is acceptable or not
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 636 • Replies: 7
No top replies

 
engineer
 
  2  
Reply Thu 22 Oct, 2015 06:52 am
@dkch,
You are assuming values for Q1 and Q2. If the first N/4 values of x produce y=1, then Q1 = -0.67 and if the last half is y=3, then Q2=0, so no, you can't do that. The way I read the problem, your final answer is going to be a function of Q1 and Q2.

The probability that y=1 is

1/2 erf (Q1/sqrt 2)

The probability that y=2 is

1/2 [ erf(Q2/sqrt 2) - erf(Q1/sqrt 2)]

The probability that y=3 is

1 - 1/2 erf(Q2 / sqrt 2)

where erf is the error function.
0 Replies
 
dkch
 
  1  
Reply Thu 22 Oct, 2015 07:57 am
@dkch,
It is not understood why erf of x will be taken into consideration for the calculation of variance of y. Please explain.
engineer
 
  1  
Reply Thu 22 Oct, 2015 08:45 am
@dkch,
You need to know how many 1's, 2's and 3's you are going to get. For any given value of Q1 and Q2, the fraction of the normal curve that falls into the three categories will be dictated by the cumulative normal function. Because you defined the average as zero and the standard deviation as one, Q1 and Q2 are just Z scores. You need to know the value of cumulative normal function at Q1 and Q2 to find the mean and variance of your y's.

Let's say Q1=-4 and Q2=4. All of your values for y will be 2 and your variance will be practically zero. But what if Q1=-.00001 and Q2=+.00001? Then half of your y values will be 1 and the other half will be 3 so your variance will be one.
dkch
 
  1  
Reply Fri 23 Oct, 2015 12:38 am
@engineer,
It can be shown that
Var(y) = 3F(Q1)+F(Q2)-[F(Q1)+F(Q2)]^2
using N distribution table (Z-score),where F(x),representing the reqrd function.
Again we have
F(Q1) = 0.25 for x = -0.67
F(Q2)= 0.50 for x = 0.0
Hence putting these values we get var(y) = 3x0.25 +0.5 -(0.25+0.5)^2 = 0.6875
This value is same as my calculated value.

Please comment.
engineer
 
  1  
Reply Fri 23 Oct, 2015 04:56 am
@dkch,
dkch wrote:

F(Q1) = 0.25 for x = -0.67
F(Q2)= 0.50 for x = 0.0

Are you given this somewhere? In your problem statement you did not state that you know what Q1 and Q2 are.
dkch
 
  1  
Reply Sat 24 Oct, 2015 05:45 am
@engineer,
Q1 AND Q2 are 1st and 2nd quartile
engineer
 
  1  
Reply Sat 24 Oct, 2015 12:51 pm
@dkch,
Then yes, you did it correctly.
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » calculation of variance
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.07 seconds on 11/16/2024 at 05:30:06