Question: Python Stats Commute times from town A to town B are obtained for two different highways. The sample size obtained for the first highway is

Python Stats

Commute times from town A to town B are obtained for two different highways. The sample size obtained for the first highway is 40, and it is found that the average commute time is 5.35 hours with a standard deviation of 3.1 hours. The sample size obtained for the second highway is 50, and it is found that the average commute time is 4.95 hours with a standard deviation of 5.8 hours. Which of the following Python lines along with this summary data can be used to perform a hypothesis test to conclude whether or not the population means are different?

Question 9 options:

a)

from scipy.stats import ttest_ind_from_stats as ttest n1 = 40 mean1 = 4.95 stdev1 = 5.8 n2 = 50 mean2 = 5.35 stdev2 = 3.1 print(ttest(mean1, stdev1, n1, mean2, stdev2, n2, equal_var=False))

b)

from scipy.stats import ttest_ind_from_stats as ttest n1 = 40 mean1 = 5.35 stdev1 = 3.1 n2 = 50 mean2 = 4.95 stdev2 = 5.8 print(ttest(mean1, stdev1, n1, mean2, stdev2, n2, equal_var=False))

c)

import scipy.stats as st n1 = 40 mean1 = 5.35 stdev1 = 3.1 n2 = 50 mean2 = 4.95 stdev2 = 5.8 print(st.ttest_ind(mean1, stdev1, n1, mean2, stdev2, n2, equal_var=False))

d)

from scipy.stats import ttest_ind_from_stats as ttest n1 = 40 n2 = 50 print(ttest(n1, n2, equal_var=False))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!