[R] Creating a specific skewed distribution
Mike Lawrence
Mike.Lawrence at dal.ca
Wed Jun 10 15:39:00 CEST 2009
With skewed unimodal distributions, the mode can't equal the mean, so
assuming you want the mean to be around 30, I find that a weibull
function can get close to what you want:
> mean(rweibull(1e5,1.5,33))
[1] 29.77781
> pweibull(60,1.5,33)
[1] 0.9138475
I'm sure you can play with the parameters to try to get even closer to
what you want.
On Wed, Jun 10, 2009 at 2:48 AM, David Arnold<dwarnold45 at suddenlink.net> wrote:
> All,
> Can someone help me create a skewed distribution, mean = 30, with
> probability of selecting a random number from the distribution greater
> than or equal 60 equal to 10%?
>
> I need the probability density function to equal zero at zero, and
> have a maximum height at or near 30.
>
> Is this possible?
>
> And if it is possible, how can I adjust the distribution so that the
> probability of selecting a random number greater than or equal to 60
> is p.
>
> Thanks. No idea how to start.
>
> David
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University
Looking to arrange a meeting? Check my public calendar:
http://tr.im/mikes_public_calendar
~ Certainty is folly... I think. ~
More information about the R-help
mailing list