Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

normal distribution in python

from scipy.stats import norm

# What percentage of man are shorter than 154
mean = 161
standard_deviation = 7

from scipy.stats import norm
norm.cdf(154, mean, standard_deviation)
Comment

normal distribution in python

# Generate 10 random heights
mean = 161
standard_deviation = 7

from scipy.stats import norm
norm.rvs(mean, standard_deviation, size = 10)
Comment

python plot normal distribution

import numpy as np
import matplotlib.pyplot as plt

def get_normal(n):
  mu,sigma = 10,1
  s = np.random.normal(mu, sigma, n)
  plt.hist(s, density=True)
  plt.show()

get_normal(100)
Comment

normal distribution in python

# What height are 90% of men are shorter than?
mean = 161
standard_deviation = 7

from scipy.stats import norm
norm.ppf(0.90, mean, standard_deviation)
Comment

PREVIOUS NEXT
Code Example
Python :: python api define bearer token 
Python :: if object has property python 
Python :: python get string from decimal 
Python :: tkinter messagebox 
Python :: how to hide turtle in python 
Python :: nlargest heapq 
Python :: how to sort tuples in list python 
Python :: Python cheat sheet pdf download 
Python :: print subscript and superscript python 
Python :: how to get the first few lines of an ndarray 3d 
Python :: how to find the number of times a number appears in python 
Python :: zip django template 
Python :: python3 add dictionary to dictionary 
Python :: how to rotate image in pygame 
Python :: delete spaces in string python 
Python :: pandas not in list 
Python :: replace df with 
Python :: Python Tkinter TopLevel Widget Syntax 
Python :: get last element of a list python 
Python :: jaccard distance python 
Python :: using df.astype to select categorical data and numerical data 
Python :: how to iterate over rows in a dataframe in pandas 
Python :: sort by multiple keys in object python 
Python :: python get date from unix timestamp 
Python :: django signup view 
Python :: numpy count occurrences in array 
Python :: python printing to a file 
Python :: object literal python 
Python :: python do nothing 
Python :: how to add vertical line on subplot in matplotlib 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =