Solved: Mean & Variance: Find E(Y), Var(Y) of |tan(X)|, cot(X)

In summary, the conversation revolves around finding the mean and variance of a function involving transformations of variables. The specific example given is finding the pdf, E(Y), and Var(Y) for Y = |tan(X)| where X is uniformly distributed on (-pi/2, pi/2). The individual is unsure if their solutions for E(Y) and Var(Y) are correct, as they involve operations with infinity and limits. They were also able to solve a similar problem involving Y = cot(X) and X being uniformly distributed on (0, pi). However, they are unsure if their solutions for E(Y) and Var(Y) are correct in this case as well. The main issue seems to be with understanding operations of infinity and limits.
  • #1
island-boy
99
0
I'm having a problem with my answer for a question involving finding the mean and variance of a function. I'll state the question and list the steps I did so maybe you guys can see where I went wrong.

The question is:
Given Y = |tan(X)| and X is uniformly distributed on (-pi/2, pi/2) Find
a) the pdf of Y
b) E(Y)
c) Var(Y)

for a) I was able to come up with the answer
[tex] g(y) = \frac{2}{\pi (1 + y^2)} for 0 < y < \infty [/tex]
0 otherwise

which I'm pretty sure is correct (by transformation of variables)

for b)
I have:

[tex] E(Y) = \int_{0}^{\infty} y \frac{2}{\pi (1+y^{2})} dy[/tex]
[tex] = \frac{1}{\pi} \lim_{b\rightarrow\infty} [ ln (1+y^{2}]_{0}^{b} [/tex]
[tex] = \frac{1}{\pi} [ \infty - 0] [/tex]
[tex] = \infty [/tex]

for c)
I solve first for E[Y^2]
[tex] E[Y^{2}] = \int_{0}^{\infty} y^{2} \frac{2}{\pi (1+y^{2})} dy[/tex]
[tex] = \frac{2}{\pi}\int_{0}^{\infty} \frac{y^{2}}{(1+y^{2})} dy[/tex]
[tex] = \frac{2}{\pi}\int_{0}^{\infty} 1 - \frac{1}{(1+y^{2})} dy[/tex]
[tex] = \frac{2}{\pi} \lim_{b\rightarrow\infty}[ y - arctan(y)]_{0}^{b}[/tex]
[tex] = \frac{2}{\pi} [\infty - \frac{\pi}{2} - (0 - 0)][/tex]
[tex] = \infty [/tex]

thus
[tex] Var[Y] = E[Y^{2}] - (E[Y])^{2} [/tex]
[tex] = \infty - (\infty)^{2} [/tex]
[tex] = undefined ? [/tex]

Is this correct?
my real problem is the mean being equal to infinity, is this possible?
as for the variance, is it possible to have undefined variance?

A similar problem was also asked where I am to find
Given Y = cot(X) and X is uniformly distributed on (0, pi) Find
a) the pdf of Y
b) E(Y)
c) Var(Y)

Here, I was able to get
E(Y) = either 0 or undefined
and
Var(Y) = either infinity (if mean is 0) or undefined (if mean is undefined)

are these possible? and which is correct?
Specifically, I'm not sure if my solution for the mean is correct, which would affect my solution for the variance

my solution for the pdf, btw, is
[tex] g(y) = \frac{1}{\pi (1 + y^{2})} for -\infty < y < \infty[/tex]

here's what I did:
[tex] E(Y) = \int_{-\infty}^{\infty} y \frac{1}{\pi (1+y^{2})} dy[/tex]
[tex] = \frac{1}{2\pi} \lim_{b\rightarrow\infty} [ ln (1+y^{2}]_{-b}^{b} [/tex]
[tex] = \frac{1}{2\pi}[ \lim_{b\rightarrow\infty} ln (1+b^{2}) - \lim_{b\rightarrow\infty} ln (1+(-b)^{2})[/tex]

now is this
[tex] = \frac{1}{2\pi} [ \infty - \infty] [/tex]
= undefined

or
[tex] = \frac{1}{2\pi}[0] [/tex]
[tex] = 0 [/tex]

since I'm pretty sure that my answer for
E(Y^2) = infinity
is correct

thus var(Y) = either infinity (if mean is 0) or undefined (if mean is undefined)

are these answers correct (and which ones are the correct answers?)

Thanks for you help guys
 
Last edited:
Physics news on Phys.org
  • #2
I guess you could say that my main problem has more to do with operations of infinity and limits than on mean and variance :)
 

1. What is the formula for finding the mean of |tan(X)|?

The formula for finding the mean of |tan(X)| is E(|tan(X)|) = ∫|tan(X)|f(x)dx, where f(x) is the probability density function of X.

2. How do you calculate the variance of |tan(X)|?

The variance of |tan(X)| can be calculated using the formula Var(|tan(X)|) = E(|tan(X)|^2) - [E(|tan(X)|)]^2.

3. What is the significance of the absolute value in the formula for finding E(Y) and Var(Y)?

The absolute value ensures that the values of |tan(X)| and cot(X) are always positive, as the tangent and cotangent functions can have both positive and negative values. This ensures that the mean and variance calculations are not affected by the direction of the values.

4. Can the mean and variance of |tan(X)| and cot(X) be negative?

No, the mean and variance of |tan(X)| and cot(X) cannot be negative. The absolute value in the formula ensures that the values are always positive, and the tangent and cotangent functions never have negative values.

5. How is the mean and variance of |tan(X)| and cot(X) affected by the distribution of X?

The mean and variance of |tan(X)| and cot(X) are affected by the distribution of X through the probability density function f(x). Different distributions of X will result in different values for the mean and variance. For example, a uniform distribution will result in a different mean and variance compared to a normal distribution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
659
  • Calculus and Beyond Homework Help
Replies
13
Views
479
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
958
  • Calculus and Beyond Homework Help
Replies
2
Views
539
  • Calculus and Beyond Homework Help
Replies
2
Views
149
  • Calculus and Beyond Homework Help
Replies
31
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
Back
Top