|
Size: 981
Comment: Initial commit
|
Size: 1286
Comment: Moving to analysis
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| ## page was renamed from Statistics/BernoulliDistribution | |
| Line 3: | Line 4: |
| The '''Bernoulli distribution''' is a discrete propability distribution that gives 1 with probability ''p'' and 0 with probability ''q = 1 - p''. | The '''Bernoulli distribution''' is a discrete probability density function, specifically giving outcomes 0 or 1. |
| Line 11: | Line 12: |
| == Statistics == | == Description == |
| Line 13: | Line 14: |
| The expected value of a Bernoulli-ditributed variable is ''E[X] = p''. | The distribution gives outcome 1 with probability ''p'', and 0 with probability ''q = 1 - p''. It is appropriate for modeling any binary event. |
| Line 15: | Line 16: |
| The variance of a Bernoulli-distributed variable is ''Var[X] = p(1 - p) = pq''. | A variable distributed this way is notated like ''X ~ Bernoulli(p)''. (Sometimes shortened to 'Bern'.) |
| Line 23: | Line 24: |
| == Sampling == | == Moments == The [[Statistics/Moments|first moment]] is ''E[X] = p''. The [[Statistics/Variance|variance]] is ''Var[X] = p(1 - p) = pq''. ---- == Usage == === Sampling === |
Bernoulli Distribution
The Bernoulli distribution is a discrete probability density function, specifically giving outcomes 0 or 1.
Description
The distribution gives outcome 1 with probability p, and 0 with probability q = 1 - p. It is appropriate for modeling any binary event.
A variable distributed this way is notated like X ~ Bernoulli(p). (Sometimes shortened to 'Bern'.)
The sum of repeated and independent Bernoulli-distributed events are described by the binomial distribution.
Moments
The first moment is E[X] = p.
The variance is Var[X] = p(1 - p) = pq.
Usage
Sampling
If all frame listings have an equal probability of selection, sampling can be implemented like:
scalar p = .2 /* Probability of selection */ set seed 123456789 generate double r = runiform() generate sampled = (r < p)
The expected number of cases sampled is np; the sample size is described by the binomial distribution.
