Exercise

Evaluating BMI outcomes

What is the difference in the predicted disease progression (the response, y) for patients who are in the top 10% of BMI compared to the lowest 10% of BMI? You'll use the results of a simulation sampling the multivariate normal distribution to answer this question!

The simulation has already been performed for you: your task is to evaluate the simulation results in df_results.

The following libraries have been imported for you: pandas as pd, numpy as np, and scipy.stats as st.

Instructions

100 XP
  • Use np.quantile() to calculate the 10th and 90th quantile of bmi in the simulated results, saving as bmi_q10 and bmi_q90.
  • Use bmi_q10 and bmi_q90 to filter df_summary and obtain predicted y values.