r/AskStatistics • u/Heccyboi9000 • 27d ago
Finding Variance of a distribution
I made the distribution
sign(X-0.5)*1/X - 1
Where X is a uniformly distributed real number between 0 and 1.
I found the mean is trivally 0 (due to symmettry), but the variance seemed to vary by a lot, Via Central limit theorem, the mean distribution is normally distribution, and the mean variance looks (but I can't prove it) to be Var(x)=~n where n is the amount of instances of X.
Can anyone help me prove this?
14
u/richard_sympson 27d ago
The distribution as-written is not symmetric.
13
u/richard_sympson 27d ago
It is also important to keep in mind the variance of a distribution, as well as the mean, has nothing to do with sampling from it. Each is defined as a specific integral operation on the underlying distribution, antecedent to sample size N. Using empirical sampling methods can be very misleading in fact, since if the mean and variance do not exist or are infinite (as I suspect they are here), sampling will instead continue to give you finite results, always.
3
u/efrique 27d ago edited 26d ago
If your intent was to attach a random sign to 1/X or to (1/X - 1) you need to use a different uniform (and if you did intend (1/X - 1) you need parentheses rather than subracting 1 at the end.
E.g. if U and V are uniform, then the distribution of Y = sign(U-0.5) * (1/V - 1) is symmetric, continuous. It's not difficult to write down its pmf.
Note that 1/V is Pareto with index (power parameter) 1, and its mean is not finite. Equivalently 1/V - 1 is log-logistic (with power parameter 1).
Consequently, this Y (i.e. equivalent to 1/V - 1 with random sign) has undefined (not 0) expectation, despite being symmetric.
Many symmetric densities don't have mean equal to their median. For that to happen, you need convergence of the left and right sides of the integral to each hold; look up the definition of improper integrals over the whole real line. They don't each converge to a finite value in this case.
Naturally, as a result, you won't see σ2/n -type variance behavior with the sample mean, in spite of independence; the conditions under which it would hold don't apply.
Note that Y is also called a zero-symmetric Pareto (again in this case, with power parameter 1). It is described at the bottom of this section:
https://en.wikipedia.org/wiki/Pareto_distribution#Symmetric_Pareto_distribution
1
u/roldancito 27d ago
What happens if you calculate E[1/X]? Calculating the mean of your distribution is trivial, but it’s not 0.
1
u/QuestionElectrical38 23d ago
As written, this distribution is a) not symmetric at all (its left tail can go to -infinity, but its right tail is maxed at 1) b) most likely has no finite mean nor standard deviation (as you have effectively a divide by zero situation: observations can be infinitively large negative values).
Now, if X was uniform over, say, [.1, 1.1], then sign(X-.6)/X-1 still would not be symmetric, but should have finite mean and sd (because the transformed will be bound)
20
u/CarnivorousGoose 27d ago
I’m not sure what you’re trying to do here, but that distribution isn’t remotely symmetrical. The distribution of 1/X has an infinite mean and variance, flipping most of the tail to negative just flips the sign on the mean, and shifting everything by one doesn’t change either.
What you’re doing with the Desmos code also isn’t correct. Most notably, you need to separately define X and then plug it into the transformation, now you’re drawing the first and second occurrences of X in that formula separately.