Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials Of Business Statistics

Authors: Bruce Bowerman, Richard Connell, Emily Murphree, Burdeane Or

5th Edition

978-1259688867, 1259688860, 78020530, 978-0078020537

More Books

Students also viewed these Operating System questions

Question

i need 4 6 7 .

Answered: 1 week ago