Open oldoc63 opened 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.
Save the interquartile range for budget to a variable called iqr_budget and print the result.
Save the variance to a variable called var_budget and print the results.
Save the standard deviation to a variable called std_budget and print the results.
Save the mean absolute deviation to a variable called mad_budget and print the result.
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: