DistAlias-package: Probability Distribution Wrapper

Description Details Author(s) Examples

Description

Fetches probability distribution functions, but using commands that aren't impossible to remember, unlike the defaults.

Details

The DESCRIPTION file: This package was not yet installed at build time.

Index: This package was not yet installed at build time.

Author(s)

Sam Levey

Maintainer: Sam Levey <tobias087@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
### Find the probably density of x=0 for a standard normal.

## Normal R:
dnorm(0)

## Using the wrapper instead:
p("norm")(0)


### Find the cumulative probability that x<-1 for a Student T distribution, with 20 degrees of freedom.

## Normal R:
pt(-1, df=20)

## Using the wrapper instead:
cdf("t")(-1, df=20)


### For a uniform distribution between 2 and 8, find the value corresponding to the bottom 35% of the data.

## Normal R:
qunif(.35, min=2, max=8)

## Using the wrapper instead:
quant("unif")(.35, min=2, max=8)


### Generate 3 random numbers from a binomial distribution with 5 trials and a .2 success probability.

## Normal R
rbinom(3, size=5, prob=.2)

## Using the wrapper instead:
random("binom")(3, size=5, prob=.2)

slevey087/DistAlias documentation built on May 26, 2019, 4:33 a.m.