You are allowed to use any individual resources you have, including but not limited to your old homework solutions, Stack Overflow, and the class web site. You may not consult another person (except the teacher). On the first reading, please skip questions you find difficult.
# !pip install seaborn==0.9.0
import numpy as np
import pandas as pd
import scipy
import scipy.stats
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.simplefilter('ignore',FutureWarning)
df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/alcohol-consumption/drinks.csv')
From here on, consider only the "non-dry" countries.
Using only the top quartile of beer-drinking countries, plot the distribution of wine consumption. The top quartile means above the 75% of the way through the sorted data list. You can find the cutofffor the top quartile by using yourData.quantile(0.75)
from Pandas. Quantile documentation.
Per some article, estimate the alcohol contents of these drinks as:
Use these numbers to estimate the total liters of alcohol consumed. Since these are not the exact numbers used in the data set, you will not get the totals used. Make a plot of the distribution of the errors (your total alcohol estimate minus number used in table for total).
Then find the mean number of servings of beer in the modified dataset.