# Question for Lab 1 - 8:00 AM

(10 pts)

I've got a fun program on my webpage that generates random CSV data for people. You can access it and examine the first few rows via Python like so:

```
import pandas as pd
df = pd.read_csv('https://www.marksmath.org/cgi-bin/random_data.csv?username=mark')
df.head()
```

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 mean and sample standard deviation 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

import pandas as pd

df = pd.read_csv('https://www.marksmath.org/cgi-bin/random_data.csv?username=hmcdiarm')

df.head()

I imported my data like. so:

I can compute the mean and standard deviation using the

`describe`

command:Here's my histogram:

The mean for my heights is 65.69149999999999

My mean code is below:

My standard deviation is 3.9195194961637934

My standard deviation code is below:

Here is my Histogram:

My histogram code is also below:

I can compute the mean and standard deviation using the df.height.describe() command.

mean 66.261000

std 3.559419

My Data:

Mean and Standard Deviation

Here's my dataset

By insterting the lines:

It will calculate the mean and standard deviation:

[66.32059999999997, 4.233640365864199]

I made the histogram using:

I imported my data like. so:

I can compute the mean and standard deviation using the describe command:

[df.height.mean(), df.height.std()]

[67.02159999999999, 3.7525925637477564]

Made a histogram using:

Imported my data like so:

I computed the mean and standard deviation using this code:

Made a histogram using:

I can compute the mean and standard deviation with the describe command.

here's my Histogram

My code was:

Mean and standard deviation is as followed:

(65.803, 3.9516191541435193)

Histogram:

I imported my data like so:

Mean and Standard Deviation:

I made my histogram using:

I Imported my data like this:

My mean and my standard deviation

Here is my Histogram

I used my school username jgreenba as opposed to justin because I forgot that my name here was Justin....

I imported my data like so:

I can compute the mean and standard deviation using the describe command:

Here's my histogram:

Here's my histogram:

![]

Here's the mean:

(66.0837, 3.859199596451643)

I imported my data like this:

Mean height

Standard deviation height

The command used to generate the histogram...

The histogram for my given data is as follows: