tripleten.com/trainer/data-scientist/lesson/afa43254-b8da-4acc-bf5b-44bd632eb9a5/task/d3785347-ce6c-4695-a545-3f69fd746a3a/
1 Users
0 Comments
9 Highlights
0 Notes
Tags
Top Highlights
The normal distribution differs from a binomial distribution in that it is continuous, and thus helps us describe the distribution of continuous random variables. (Discrete random variables can also be described with the normal distribution, but in such cases, it is an approximation.)
The Normal Distribution
A normal distribution has two key parameters: mean and variance
This notation can be read as: the variable X is normally distributed with a mean of mu (μ) and a variance of sigma squared (σ²), i.e. a standard deviation of sigma.
X ∼ (μ, � 2 σ 2 )
When we graph normal distributions, we're working with probability density plots
Finding probability using the normal distribution
Python can make the calculations for us. For this we need methods from the scipy.stats package: norm.cdf() and norm.ppf(). norm — normal continuous random variable cdf — cumulative distribution function ppf — percent-point function Both work with the normal distribution if the mean and variance/standard deviation are known. norm.cdf gives the probability of the interval to the left of the value when the value along the X axis is known. Scenario: Mice eat an average of two ounces of cheese per day. We want to know the probability of a mouse eating 1.5 ounces or less. norm.ppf gives the value along the X axis when the probability of the interval to the left of the value is known. Scenario: Mice eat an average of two ounces of cheese per day. We want to know the first quartile (the value greater than 25% of values).
In order to calculate the probability of getting a value below the threshold (few visitors), use st.norm.cdf(). To get a value greater than or equal to the given value, you'll need to subtract the result of st.norm.cdf() from 1.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.