oldoc63 / learningDS

Learning DS with Codecademy and Books
0 stars 0 forks source link

Spread for Quantitative Data #394

Open oldoc63 opened 1 year ago

oldoc63 commented 1 year ago

The spread of a quantitative variable describes the amount of variability. This is important because it provides context for measures of central tendency. For example, if there is a lot of variability in New York City rent prices, we can be less certain that the mean or median price is representative of what the typical rent is.

There are several common measures of spread:

For our rentals DataFrame, we can calculate the spread for the rent column as follows:

oldoc63 commented 1 year ago

Using the movies DataFrame, find the range for production_budget and save it to a variable called range_budget. Print range_budget to see the result.

oldoc63 commented 1 year ago

Save the interquartile range for budget to a variable called iqr_budget and print the result.

oldoc63 commented 1 year ago

Save the variance to a variable called var_budget and print the results.

oldoc63 commented 1 year ago

Save the standard deviation to a variable called std_budget and print the results.

oldoc63 commented 1 year ago

Save the mean absolute deviation to a variable called mad_budget and print the result.