# Range of a function

Hi guys...I am having big trouble finding the range of a function dependant on 2 variables.
The function is D=X1-X2.
R=|D|
How do you find the range of R and D?Is the range of R from 0 to infinity and that of D from - infinity to infinity?

For the record,this is the question.

Suppose X1 and X2 are independent normal variables with mean m and standard deviation s. Define the difference
D = X1 – X2
Remember that any linear combination of normal variables is itself normally distributed, so it follows that D is normally distributed.
(i) Write down the mean, variance, and standard deviation of D.
(ii) Now define the range ( R ) as the absolute value of D. That is:
R = D|
Sketch the distribution of D, and hence sketch the distribution of R.

if the question was f(x) = x could you figure out the range? Is there a way you could make your function D look and behave like f(x)? The range of |D| is going to be the range of D that is postive union with the positive version of the range of D that is negative.

if the question was f(x) = x could you figure out the range? Is there a way you could make your function D look and behave like f(x)? The range of |D| is going to be the range of D that is postive union with the positive version of the range of D that is negative.

According to my calculations,it is a stright line passing thru x=X1 and y=-X2.For the modulus of this....Id say the y-intercept becomes y=X2.

However the fact that the question suggests the shape of normal distribution confuses me.According to my diagram,the fn is an inverted version of the normal distribution curve but with sharp edges instead of a curve like geometry.

matt grime
Homework Helper
According to my calculations,it is a stright line passing thru x=X1 and y=-X2.For the modulus of this....Id say the y-intercept becomes y=X2.

This is a function from R^2 to R, so it's graph can't be a line - it is a surface in R^3. Actually it is a plane.

If we use the range in its traditional meaning, then it is the z in R for which there are x and y with f(x,y)=-x-y=z. Clearly, if x,y are in R this poses no restriction on z, so the range is R.

However the fact that the question suggests the shape of normal distribution confuses me.According to my diagram,the fn is an inverted version of the normal distribution curve but with sharp edges instead of a curve like geometry.

The is now something else. x and y are now random variables, and you're asked to sketch the distribution of |x-y|. x-y is normal (and in particular this implies the answer to the first part of your question), so you can plot that distribution and this has nothing to do with the previous question you asked. What is the distribution of x-y? Sketch it. What is the distibution of |x-y|?

Last edited:
This is a function from R^2 to R, so it's graph can't be a line - it is a surface in R^3. Actually it is a plane.

If we use the range in its traditional meaning, then it is the z in R for which there are x and y with f(x,y)=-x-y=z. Clearly, if x,y are in R this poses no restriction on z, so the range is R.

The is now something else. x and y are now random variables, and you're asked to sketch the distribution of |x-y|. x-y is normal (and in particular this implies the answer to the first part of your question), so you can plot that distribution and this has nothing to do with the previous question you asked. What is the distribution of x-y? Sketch it. What is the distibution of |x-y|?
Hey Matt. Thanks for that. But I still am not very clear about the distribution situation. Isnt the the distribution got using the probability distribution function? And also..the modulus of x-y...I cant picture the modulus of a distribution fn. If the fn is on the positive subaxis inthe graph,the modulud would be the same grapg right? I get the feeling my understanding of this subject is a bit flawed.

matt grime
Homework Helper
Hey Matt. Thanks for that. But I still am not very clear about the distribution situation. Isnt the the distribution got using the probability distribution function?

the distribution of what?

And also..the modulus of x-y...I cant picture the modulus of a distribution fn.

x-y is normal of mean 0. The probability that |x-y| is in the interval [a,b] (with 0<=a<b) is the probability x-y is in [a,b] plus the probability y-x is in [a,b]. Which is what? (x-y and y-x are identically distributed, remember).

x-y is normal of mean 0. The probability that |x-y| is in the interval [a,b] (with 0<=a<b) is the probability x-y is in [a,b] plus the probability y-x is in [a,b]. Which is what? (x-y and y-x are identically distributed, remember).
hmm..is it just the positive part of the probability distribution curve?

matt grime