mathdistops.pnorm¶
Module Contents¶
Functions¶
|
Calculates Cumulative Probability of the normal distribution at this quantile and plots corresponding PDF and CDF. |
- mathdistops.pnorm.pnorm(q, mean=0, std_dev=1, graph=True)[source]¶
Calculates Cumulative Probability of the normal distribution at this quantile and plots corresponding PDF and CDF.
- Parameters:
q (float) – The quantile at which to evaluate the CDF.
mean (float) – The mean (average) of the normal distribution. Default is 0.
std_dev (float) – The standard deviation of the normal distribution. Default is 1.
graph (bool) – Whether to plot the PDF and CDF graph. Default is True.
- Returns:
result –
- If graph is True (default), returns a tuple consisting a pandas DataFrame and a
layered altair Chart consisting of two graphs, CDF and PDF.
If graph is False, returns a pandas DataFrame.
- Return type:
pandas.DataFrame or tuple
- Raises:
ValueError: – If ‘std_dev’ is zero or negative, as the standard deviation must be a positive number.
TypeError: – If any of the input parameters (‘q’, ‘mean’, ‘std_dev’) are not numerical.
Example
>>> pnorm(1, mean=0, std_dev=1, graph=False) Z-score Cumulative probability 0 1.0 0.8413447460685429