Discrete Distributions

This lesson will provide an overview of discrete distributions in JAX.

Discrete distributions

There are some scenarios where we need to sample the distribution from discrete events like a coin toss result, the value of a dice roll, or the number of people.

Probability Mass Function (PMF)

The concept of CDF is the same for both continuous and discrete distributions, though PDF is replaced by the Probability Mass Function (PMF). Here we calculate the probability for a given sample directly instead of differentiation.

pX(x)=P(X=x)p_X(x) = P(X = x)

Poisson distribution

Poisson distribution is used to sample unlikely events (events with low probability).

f(k;λ)=Pr(X=k)=λkeλk!f(k; \lambda)= \Pr(X{=}k)= \frac{\lambda^k e^{-\lambda}}{k!}

Both expected value and mean will be the same:

E[X]=Var[X]=λE[X] = Var[X] = \lambda

We can sample a Poisson distribution through poisson(key, <λ's value>, size) .

Get hands-on with 1000+ tech skills courses.