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.]
-
6$\begingroup$ +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}$. $\endgroup$– whuber ♦Jul 2, 2015 at 14:25
-
$\begingroup$ @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? $\endgroup$ Jul 2, 2015 at 14:45
-
2$\begingroup$ Sure, 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. $\endgroup$– Glen_bJul 2, 2015 at 14:49
-
1$\begingroup$ Re @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$. $\endgroup$– Glen_bJul 2, 2015 at 23:31
-
1$\begingroup$ @jlandercy Some links on the general case you ask about -- stats.stackexchange.com/a/107690/805 & stats.stackexchange.com/a/419585/805 $\endgroup$– Glen_bJul 17, 2022 at 4: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.
-
$\begingroup$ 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. $\endgroup$– Community BotSep 6 at 2:30
-
$\begingroup$ 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 $\endgroup$ Sep 6 at 2:30