Random heights
(5pts)
I've got a fun program on my webpage that generates random CSV data for people. You can access it via Python like so:
%matplotlib inline
import pandas as pd
df = pd.read_csv('https://www.marksmath.org/cgi-bin/random_data.csv?username=mark')
df.tail()
first_name | last_name | age | sex | height | weight | income | activity_level | |
---|---|---|---|---|---|---|---|---|
0 | Donna | Dinan | 35 | female | 65.37 | 164.26 | 1947 | high |
1 | Antonia | Davis | 39 | female | 64.95 | 140.40 | 2188 | none |
2 | Stephanie | Buss | 30 | female | 60.75 | 181.83 | 18108 | high |
3 | Wendell | Elmore | 26 | male | 64.68 | 157.90 | 1935 | moderate |
4 | Nina | Mcilhinney | 21 | female | 59.94 | 163.38 | 5675 | none |
Here's the cool thing - the data is randomly generated but the random number generator is seeded using the username
query parameter in the URL. Thus, if I execute that command several times, I get the same result every time. That result depends upon the username
, however. Thus, if you do it with your forum username
, you'll get a different result. Thus, we all have our own randomly generated data file!
The problem: Using the code above with your username
, generate your data file and then
- Compute the average value of the heights in your data and
- create a histogram of the heights.
Be sure to include both the code that you typed, as well as the results in your post.
Comments
Code:
Histogram:
Mean: 66.207700
Mean Code:
Mean=67.024500
Standard Deviation=3.809777
Code for the histogram:
mean: 66.266400
I generated my histogram like so:
I generated my histogram like so:
Code for histogram:
I generated my mean like so:
66.30110000000003
This is an example of my histogram:
The mean was generated this way:
65.81690000000002
The standard deviation is:
3.854679615661196