Question: The table below gives the frequency with which a sample of women drink tea and coffee (Arab, Lenore et al. Gender differences in tea,

The table below gives the frequency with which a sample of women

 drink tea and coffee (Arab, Lenore et al. "Gender differences in tea, coffee, and cognitive decline in the elderly: the Cardiovascular Health Study." Journal 

The table below gives the frequency with which a sample of women drink tea and coffee (Arab, Lenore et al. "Gender differences in tea, coffee, and cognitive decline in the elderly: the Cardiovascular Health Study." Journal of Alzheimer's disease: JAD vol. 27,3 (2011): 553-66. doi:10.3233/JAD-2011-110431). Do women drink tea and coffee with the same frequency at the alpha = 0.01 significance level? Freq Tea Coffee 5/week 742 1148 Enter the data into an array. Calculate the chi-square statistic and p-value Write an if statement to determine if the null hypothesis that women drink tea and coffee with the same frequency is rejected or not.. Enter the data into an array. Calculate the chi-square statistic and p-value Write an if statement to determine if the null hypothesis that women drink tea and coffee with the same frequency is rejected or not. Ex: If the data for men is used, Freq Tea Coffee 5/ week 443 915 the output is: 3.776187E+02 1.903049E-80 The hypothesis that tea and coffee are drunk with the same frequency is rejected. LAB 7.6.1: LAB: Chi-square test ACTIVITY main.py 0/1 Load default template... 1 # Import the necessary modules 2 3 # Construct a contingency table 4 5 # Calculate the test statistic and p-value 6 chi2, p, df, ex = # Code for calculating test statistic and p-value 7 print (f' {chi2:.6E}') 8 print (f' (p:.6E}') 9 10 # Determine if null hypothesis is rejected or not 11 if # write appropriate if statement 12 print("The hypothesis that tea and coffee are drunk with the same frequency is rejected.") 13 else: 14 print("The hypothesis that tea and coffee are drunk with the same frequency is not rejected.")]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem well conduct a chisquare test for independence to determine if women drink tea ... View full answer

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 Operating System Questions!