# Variance of a function in an infinite space

## Homework Statement

It is given a function y(t)=ae(t) where e(t) is the "[URL [Broken] error function
[/URL]
I am looking for the variance of this function in an infinite space. Since t is time, I assume that this space is defined as [0,+∞). Thus, the usual variance functions does not apply since they need a finite space. Any suggestions?

## The Attempt at a Solution

I found https://www.physicsforums.com/showthread.php?t=114629"thread in the forum discussing the average value of a function sent to infinity. I am not sure if this is what I am looking for, though it seems valid. So I guess there is a next step to find variance through average.

Last edited by a moderator:

Related Calculus and Beyond Homework Help News on Phys.org
HallsofIvy
Homework Helper
No, the "usual variance of functions" does NOT require a finite space. It only requires that the functions go to 0 fast enough as x goes to infinity- which is true for the error function.

So I open the matlab to calculate the variance and it seems that there is not a command for the variance of a function.
So I calculate the Variance= E (x^2) - [E(x)]^2

However, when I calculate the E(x^2) = int (x^2*erf^2) matlab returns this:

Warning: Explicit integral could not be found.

Ex2 =

int(x^2*erf(x^2), x)

So can I really find the variance like this? Is there something I am missing?

I am sorry for double posting but it seems that I find a wall in my way.
Could you show me the direction about the variance of the error function?

Homework Helper
Why are you calculating $E(x^2)$ as

$$\int x^2 erf^2(x) \, dx$$
?

(Specifically, why is the error function squared?)

Sorry, forget about the infinities in the previous post.

So I want to calculate the variance with Variance= E (x^2) - [E(x)]^2

I calculate the μ=E(erf(x))=lim(L->inf)((1/L)*int(a*erf(x),0,L)) = a

So then I want to calculate the E(erf(x)^2) and with the previous type I have an integral of (erf(x))^2 . With Taylor series I find a solution something like:

-(4*L^3*(2*L^2 - 5))/(15*pi)

but when I take the lim(L->inf) of this expression the result is -inf.
I am pretty sure that this is not right.

VietDao29
Homework Helper
Sorry, forget about the infinities in the previous post.

So I want to calculate the variance with Variance= E (x^2) - [E(x)]^2

I calculate the μ=E(erf(x))=lim(L->inf)((1/L)*int(a*erf(x),0,L)) = a

So then I want to calculate the E(erf(x)^2) and with the previous type I have an integral of (erf(x))^2 . With Taylor series I find a solution something like:

-(4*L^3*(2*L^2 - 5))/(15*pi)

but when I take the lim(L->inf) of this expression the result is -inf.
I am pretty sure that this is not right.
As statdad has pointed out in post #5, E(X2) is definitely not:
$$\int x^2 \mbox{erf}^{{\color{Red}2}}(x) dx$$

The variance of a random variable X with probability density function f(x) is calculated by the following formula:

$$\mbox{Var}(X) = E[X^2] - (E[X]) ^ 2 = \int x^2 {\color{Red}f(x)} dx - \left( \int x {\color{Red}f(x)} dx \right) ^ 2$$

Why are you calculating $E(x^2)$ as

$$\int x^2 erf^2(x) \, dx$$
?

(Specifically, why is the error function squared?)

Last edited:
So I cannot find the variance without having the probability density function?

Another thought: Can I say from the plot that mean of erf(x) is zero and variance of erf(x) is one??

Last edited by a moderator:
HallsofIvy
Homework Helper
So I cannot find the variance without having the probability density function?
What do you think "variance" means? You cannot define variance without a probabilityh density function.

Another thought: Can I say from the plot that mean of erf(x) is zero and variance of erf(x) is one??
Well, you can't tell it exactly from the plot but erf(x) is, by definition, the standard normal distribution, "standard" meaning here that the mean is 0 and the standard deviation is 1. The variance is the square of the standard deviation and so is also 1.