TransWikia.com

Generate bounded numbers with approximately skewed normal distribution

Cross Validated Asked by wrahool on November 26, 2021

Possible duplicate

I’m trying to generate n numbers, each of which lies between [1,m] (where m is an integer), such that their frequency roughly follows a skewed normal distribution.

So far I have been able use the fGarch package and generate a skewed normal distribution with:

library(fGarch)
r = rsnorm(n=1000, mean = 20, sd = 15, xi=2)
plot(density(r))

but I cannot set lower and upper limits on the numbers.
Is there a way I can ensure that the numbers are bounded but also approximate a skewed normal distribution?

UPDATE: I am trying to model the number of books n people read, given a set of m books in the universe. Skewed normal because empirical data of most media consumption suggests that actual consumption patterns are positively skewed, while survey self-reports suggest the patterns are negatively skewed. Consumption patterns are rarely normally distributed.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP