Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Chlorine use mean (arm 1) lower = percentile (2.5, chlorine_uses_arml) upper = percentile (97.5, chlorine_uses_arml) print (fThe 95% confidence interval for arm 1 is [
Chlorine use mean (arm 1) lower = percentile (2.5, chlorine_uses_arml) upper = percentile (97.5, chlorine_uses_arml) print (f"The 95% confidence interval for arm 1 is [ {lower), {upper} ]") The 95% confidence interval for arm 1 is [0. 011834319526627219, 0.0650887573964497] Repeating for Arm 2... arm_2 = WGPRd2 . where( "treatment_arm" , 2) chlorine_uses_arm2 = make_array ( ) for i in np. arange (1000) : bootstrapped_sample = arm_2 . sample( ) sample_mean = np. mean (bootstrapped_sample. column ( 'cl2n21pnk' ) ) chlorine_uses_arm2 = np. append (chlorine_uses_arm2, sample_mean) Table () . with_columns ( "Chlorine use mean (arm 2)", chlorine_uses_arm2) . hist( ) 2000 1750 1500 1250 Percent per unit - 1000 750 500 250 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 Chlorine use mean (arm 2) lower = percentile(2.5, chlorine_uses_arm2) upper = percentile (97.5, chlorine_uses_arm2) print (f"The 95% confidence interval for arm 2 is [ (lower), {upper) ]") The 95% confidence interval for arm 2 is [0. 010101010101010102, 0. 09090909090909091] Question 4.1: What can we tell by comparing the confidence intervals for Arm 1 and Arm 2? Do they overlap? What does that mean
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started