Statistical Inference We simulated age_group1 and age_group2 using two different ranges. Clearly, in this simulated example, we are using two different distributions, and we know that their mean should be statistically different. Importantly, we can safely assume that the data points are independent. Why? Because you have separately created age_group1 and age_group2. Be sure to print out the test statistics & P-value. Your task: Perform a Student's t-test to formally determine whether the arithmetic means of age_group1 and age_group2 are different. Report the test statistics and P-value. You can use scipy or statsmodel libraries for this task. If you are comfortable with the math, you can also implement the test from scratch on your own. However, you cannot use any other libraries. # YOUR CODE HERE
Statistical Inference
We simulated age_group1 and age_group2 using two different ranges.
Clearly, in this simulated example, we are using two different distributions, and we know that their mean should be statistically different.
Importantly, we can safely assume that the data points are independent. Why? Because you have separately created age_group1 and age_group2.
Be sure to print out the test statistics & P-value.
Your task: Perform a Student's t-test to formally determine whether the arithmetic means of age_group1 and age_group2 are different. Report the test statistics and P-value.
You can use scipy or statsmodel libraries for this task. If you are comfortable with the math, you can also implement the test from scratch on your own. However, you cannot use any other libraries.
# YOUR CODE HERE
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)