December 2017
Intermediate to advanced
386 pages
10h 42m
English
The cumulative distribution function (CDF) of a random variable is calculated as follows:
The CDF of a continuous random variable is calculated in a way similar to that in which we calculate the pdf of a continuous random variable.
The following code snippet calculates the CDF of a variable:
import numpy as npimport matplotlib.pyplot as pltfrom scipy.stats import norm
gaussian = norm(loc=0, scale=1.0)x = np.linspace(-5, 5, 1000)y = gaussian.cdf(x)
In the preceding snippet of code, we have calculated the CDF for the continuous random variable that is expected to generate a Gaussian distribution with a mean of 0 and a standard deviation of 1.
Note that we have ...
Read now
Unlock full access