DEV Community

Cover image for Knowing Probability Distributions…
Ashwin Sharma P
Ashwin Sharma P

Posted on

7 6

Knowing Probability Distributions…

A probability distribution is a function that describes the chances of finding a random variable over a defined range.

Below is the list of some of the most used probability distribution functions.

• Normal(Gaussian) distribution.
• Log-Normal distribution.
• Bernoulli distribution.
• Binomial distribution.
• Poisson distribution.

Today let’s see what are Bernoulli, Binomial and Poisson distribution.

Bernoulli distribution:-

The distribution of random variables which can take up two values, i.e. either success(1) or failure(0) is called a Bernoulli distribution. Some examples are coin flip, whether a patient tested has cancer or not, etc.

Consider we have a random variable X, which follows Bernoulli distribution. It can be denoted as; X~Ber(p)

The probabilities are given as:-
For success: P(X=1)=p
For failure: P(X=0)=1-p
The standard deviation is given by; Standard Deviation=√[p(1-p)]
Variance is the square of standard deviation and hence Variance=p(1-p)
The expectation for Bernoulli distribution is given as E[X]=p

Binomial distribution:-

A binomial distribution is a distribution of random variables that represent the number of success or failures in 'n' successive independent trials of a Bernoulli experiment. Examples include coin flips for a particular ’n’ number of times, result whether 'n' number of patients have hypertension or not.

Thus we can say that binomial distribution is some complex version of Bernoulli distribution.

Suppose X is a random variable following Binomial distribution. It can be denoted as- X~Bin(n,p)

Probability is given as below-
Expectation E[x]=np
Variance is given by var(X)=np(1-p)

Poisson distribution:-

The Poisson distribution is the special case of binomial distribution where p → 0 and n → ∞.

It is used when we have to express the probability of a given set of event occurs in a fixed time interval or a constant space with a fixed mean rate. In addition to this, the event happening should be independent of the time since the occurrence of the last event.

The probability function is given as;
Expectation E[X]=λ where np → λ as p →0 and n →∞.
Here Standard Deviation=√λ

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up