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 A = np.array([6, 8, 8, 10, 12, 12, 12, 12, 12, 14, 14, 14, 14, 16, 16, 16, 18, 18, 18, 18, 22]) B = np.array([10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20])

Questions about programming?Chat with your personal AI assistant