Question for Lab 1 - 11:00

(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
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!

1. Compute the mean and sample standard deviation of the heights in your data and
2. create a histogram of the heights.

Be sure to include both the code that you typed, as well as the results in your post.

• edited January 27

I imported my data like this:

import pandas as pd

The mean of my heights is:

df.height.mean()

Output: 66.49599999999998

Finally, here's my histogram:

df.hist('height', edgecolor='black', grid=False);

• edited January 29

I imported my data like this:

import pandas as pd

The mean of my heights is:

df.height.mean()
# output: 66.7983

The standard deviation of my heights is:

df.height.std()
# output: 3.798472860335726

A histogram of my height is:

df.hist('height') ![]

• I imported my data like this:

import pandas as pd

The mean of my heights is:

df.height.mean()
# Output: 66.8235

The standard deviation of my heights is:

df.height.std()
# Output: 4.174962499075514

A histogram of my heights is:

df.hist('height', edgecolor='black', grid=False, bins=[57.5,60,62.5,65,67.5,70,72.5,75]);

• edited January 27

I imported my data like this:

import pandas as pd

The mean of my height is:

df.height.mean()
#. Output: 65.73560000000002

The standard deviation of my height is:

df.height.std()
#. Output: 3.6443689287569234

Here is my Histogram:

df.hist('height', edgecolor='black', grid=False,

• edited January 27

I imported my data like this:

import pandas as pd

The mean of my heights is:

df.height.mean()
Output: 66.20770000000003

Standard deviation:

df.height.std()
Output:3.490168255907652`

Histogram:

df.hist('height');

• I imported my data like this:

print(len(df))

The mean of my heights is:

df.height.mean()
# Output: 66.6557

The standard deviation is:

df.height.std()
# Output: 3.836129482178671

My histogram:

df.hist('height', edgecolor='black', grid=False,);

• My data set is this:

import pandas as pd

The mean of my heights is

df.height.mean()
#. Output: 67.3123

The standard deviation of my heights is

df.height.std()
#. Output: 3.563894661969705

Here is my histogram

df.hist('height', edgecolor='black', grid=False);

• edited January 27

I imported my data like this:

The mean of my height is:

df.height.mean()
#. Output: 66.7958

The standard deviation of my height is:

df.height.std()
#. Output: df.height.std()

Finally, here's my histogram:

df.hist('height', edgecolor='black', grid=False,

• edited January 29
import pandas as pd

My mean is

df.height.mean()
#. Output: 66.66900000000004

My standard deviation is

df.height.std()
#. Output: 4.087922714681885

My histogram is

df.hist('height', edgecolor='black', grid=False,)

• edited January 27

I Imported my data like this:

import pandas as pd

Mean code:

df.height.mean()

Standard deiviation code:

df.height.std()

Histogram code:

df.hist('height');

• edited January 27

I imported my data like this:

• edited January 29

I imported my data like this:

import pandas as pd

The mean of my heights is:

df.height.mean()
# Output: 67.02449999999999

The standard deviation of my heights is:

df.height.std()
# Output: 3.8097767306462633

A histogram of my heights is:

df.hist('height', edgecolor='black', grid=False,);

• I imported my data like this:

print(len(df))

The mean of the height is:

df.height.mean()
#Output = 65.539

And the standard deviation is:

df.height.std()
#Output = 3.373509547439679

Finally, here's the histogram:

df.hist('height', edgecolor='black', grid=False,);

• I imported my data like this:

import pandas as pd

The mean of my height is:

df.height.mean()
#.   Output: 66.05620000000002

Here is my histogram:

df.hist('height', edgecolor 'black', grid=False

• edited January 29

I imported my data like this

The mean of my height is:

df.height.mean()

Output:66.81249999999999

The standard deviation is:

df.height.std()

Output:4.248674273324336

• edited January 29

I imported my data like this:

import pandas as pd

The mean of my heights is:
df.height.mean()

output:66.711

The Standard deviation is:
df.height.std()

output:3.8964538397435846

Here is my histogram:

• edited January 27

I imported my data like this:

The mean of my heights is:

df.height.mean()
#. Output: 66.07379999999996

The standard deviation is:

df.height.std()
#. Output: 3.8900325308291563

finally my histogram is:

• edited January 27

I imported my data like this

import pandas as pd

mean height

df.mean()
output:66.3857

standard deviation height

df.height.std()
output:4.070443416393429

Histogram height

• edited January 27

I imported my data like this:

import pandas as pd

Mean height

df.height.mean()
66.40280000000001

Standard deviation height

df.height.std()
4.127169421570119

The histogram for my given data is as follows:

• edited January 28

Here is my data set

import pandas as pd

Here is my histogram

df.hist('height', edgecolor='black', grid=False);

mean height

df.height.mean()
66.08630000000002

Standard deviation height

df.height.std()
3.5759374429594817

• edited January 29

this is my data set:

import pandas as pd

here is how i computed the mean height:

df.height.mean()

output:66.49599999999998

here is how i computed the standard deviation:

df.height.std()

output:3.9782326922309807

this is my histogram:

df.hist('height', edgecolor='black', grid=False);

histogram