Question
The weights of people can be modelled with a Gaussian probability density function, with some mean and standard deviation. There are differences in weights of
The weights of people can be modelled with a Gaussian probability density function, with some mean and standard deviation. There are differences in weights of men and women in the general population. As per this link, the data from USA in 2007 indicates that the average weight for men is 89.52 kg with a standard deviation of 18.11 kg. Using the function random.normal in the numpy package in Python, generate weight data for one million men. Then using the function histogram in the numpy package and matplotlib.pyplot, plot the density function for men using the data generated for one million men. Now repeat the same for one million women. Note that the average weight for women is 73.31 kg with a standard deviation of 17.69 kg. Plot both the density functions on the same figure with legends.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started