I've found many questions and answers about transforming skewed distribution to normal. This question might arise because the simplicity of working with normal data. But, is there any function that transform normal to skewed data without changing the interval of the support? how can this be done?
2 Answers
The support of a normal random variable is $(-\infty,\infty)$. Consider a normal variate, $X$.
You could create a skewed distribution with the same support with a transformation, $Y=T(X)$ such that $T$ is bijective ($\mathbb{R}$ $\to \mathbb R$) and either convex or concave. The result of applying a convex bijective transformation will be right skew and have support $(-\infty,\infty)$ and a concave bijective ($\mathbb{R}$ $\to \mathbb R$) function will be left-skew and have support $(-\infty,\infty)$.
(Concave and convex functions are not the only way to get skew results, however.)
e.g. consider
$T(x)=\begin{cases} x-1\,;& x \leq 1\\ \log(x)\,;& x > 1\end{cases}$
It will take a symmetric sample and squeeze in its values above 1, while leaving the lower values alone, resulting in a left-skew result (changing the parameters of the normal will alter how much impact this transformation has on the skewness).
[If, instead you want the sample range of the values to be the same after transformation, you can take a sample, transform it to the desired shape, and then use a linear transformation to match the minimum and maximum values.]
- 282,281
-
6+1. A simple family of infinitely differentiable transformations that can achieve any skewness coefficient (beginning with a standard Normal distribution) is $x \to \text{sgn}(\lambda)x + \exp(\lambda x)$, $\lambda\in\mathbb{R}$. – whuber Jul 02 '15 at 14:25
-
@Glen_b I'm really bad at math actually. So i'm trying to imagine it. Can the above transformation be applied to normal distribution with negative mean that far from zero? – Statasker Jul 02 '15 at 14:45
-
2Sure, but its effect will be small. However, if you know approximately where the mean is going to be (you know $\mu$ should be around $\mu_0$ say) you can replace $T(x)$ with $T_2(x)=T(x-\mu_0)$, say, which would have a much stronger effect. – Glen_b Jul 02 '15 at 14:49
-
@whuber Woww,, I'm impressed. How did you get that? Just wanna know the way you think. thanks! – Statasker Jul 02 '15 at 15:42
-
1Re @whuber's family of transforms: consider starting with $\exp(λx)$ for $λ>0$. This takes $R\to R^+$ and takes us from symmetry to varying amounts of right skewness (specifically, from a normal to a lognormal distribution). Note that values that start far below 0 end up just above 0. If we add $x$ to our transform, large negative values that were at $x_0$ now stay near $x_0$ (now on $\mathbb{R}$), but large positive values are (relatively) mostly impacted by the $\exp$ term. For left skewness bring in $λ<0$, but use $\text{sgn}(λ)$ so both terms flip the direction of $x$. – Glen_b Jul 02 '15 at 23:31
-
There's a lot more could be said about that neat little family and perhaps more things you'd look at while coming to it, but that's the gist of the kind of thought process that one might go through to come up with it. – Glen_b Jul 02 '15 at 23:39
-
Do you have a reference highlighting the link between distribution skewness and transformation convexity? – jlandercy Jul 16 '22 at 12:49
-
Not in general, since you can change the impact on skewness with a shift which doesn't change convexity. Note that the question here assumes we start with a normal distribution (and the answer focuses on the standard normal, assuming we shift and scale before and after as needed) – Glen_b Jul 17 '22 at 00:23
-
1@jlandercy Some links on the general case you ask about -- https://stats.stackexchange.com/a/107690/805 & https://stats.stackexchange.com/a/419585/805 – Glen_b Jul 17 '22 at 04:08
Despite the fancy jargon, the above answer is incorrect over the support mentioned, as neither function is normalizable if the support is x>1, so the functions do not technically define a probability distribution. The functions would be distributions if you define the support to be a closed interval.
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Sep 06 '23 at 02:30
-
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – User1865345 Sep 06 '23 at 02:30