Generation

generate functionTue, 21 Mar 2023

You are given test results for two drugs: A (results for the group of people getting drug A) and B (results for the other group of people getting drug B). 1) You need to assess whether there is a statistically significant difference in the effect in these patients. Use the null hypothesis, the inverse hypothesis, and Student's t-test for calculations. 2) construct a boxplot and histogram to visually confirm the result

import numpy as np import pandas as pd import scipy.stats as st import matplotlib.pyplot as plt %matplotlib inline np.random.seed(1) A = np.random.normal(0, 1, 50) B = np.random.normal(1, 1, 50)

Questions about programming?Chat with your personal AI assistant