Diff for "FAQ/gamma" - CBU statistics Wiki
location: Diff for "FAQ/gamma"
Differences between revisions 2 and 25 (spanning 23 versions)
 ⇤ ← Revision 2 as of 2008-02-12 16:41:35 → Size: 530 Editor: PeterWatson Comment: ← Revision 25 as of 2013-03-08 10:17:36 → ⇥ Size: 981 Editor: localhost Comment: converted to 1.6 markup Deletions are marked like this. Additions are marked like this. Line 1: Line 1: = How do I produce random variables which follow a negatively skewed distribution? = Most distributions such as the exponential and log-Normal distributions are positively skewed with the mode of the distribution occurring for lower values. Line 2: Line 5: = How do I produce random variables which follow a negative skew distribution? = The Weibull distribution is negatively skewed and may be generated [[http://www.taygeta.com/random/weibull.xml|using random variables which are uniform on the interval (0,1).]] Line 5: Line 7: Most distributions such as the exponential and log-Normal distributions are positive skewed with the model of the distribution for lower values. The below produces an open ended negatively skewed weibull distribution with parameters, 2 and 20. It has a median of Line 8: Line 10: [http://www.uib.no/people/ngbnk/kurs/notes/node31.html The Gamma distribution] which has two parameters, $$\alpha$$ and $$\beta$$ may produce negative skew where the model occurs for higher values (values > 0) when $$/alpha$$ is a lot greater than $$\beta$$. It also has no maximum value. $$2^text{-0.05}ln(2)^text{0.05}$$= 0.95.which is of form$$A^text{-1/B}ln(2)^text{1/B}$$where A and B are the two parameters of the Weibull distribution.(See [[http://www.weibull.com/AccelTestWeb/weibull_distribution.htm|here for formulae).]]{{{compute alpha=2.compute beta=20.compute rvw=((-1/alpha)*(ln(1-rv.uniform(0,1))))**(1/beta).compute med=((alpha)**(-1/beta))*(ln(2)**(1/beta)).exe.}}}

# How do I produce random variables which follow a negatively skewed distribution?

Most distributions such as the exponential and log-Normal distributions are positively skewed with the mode of the distribution occurring for lower values.

The Weibull distribution is negatively skewed and may be generated using random variables which are uniform on the interval (0,1).

The below produces an open ended negatively skewed weibull distribution with parameters, 2 and 20. It has a median of

$$2text{-0.05}ln(2)text{0.05}$$ = 0.95.

which is of form

$$Atext{-1/B}ln(2)text{1/B}$$

where A and B are the two parameters of the Weibull distribution. (See here for formulae).

compute alpha=2.
compute beta=20.

compute rvw=((-1/alpha)*(ln(1-rv.uniform(0,1))))**(1/beta).
compute med=((alpha)**(-1/beta))*(ln(2)**(1/beta)).
exe.

None: FAQ/gamma (last edited 2013-03-08 10:17:36 by localhost)