Question 5: Now that we have defined hypotheses and a test…
Question Question 5: Now that we have defined hypotheses and a test… Question 5: Now that we have defined hypotheses and a test statistic, we are ready to conduct a hypothesis test. We’ll start by defining a function to simulate the test statistic under the null hypothesis, and then use that function 1000 times to understand the distribution under the null hypothesis.use a function to simulate the test statistic under the null hypothesis.The simulate_traffic_null function should simulate the null hypothesis once (not 1000 times) and return the value of the test statistic for that simulated sample.HINT: We are trying to conduct A/B testing!”’def simulate_traffic_null(): simulate = accidents.sample(with_replacement = False).column(1) table = accidents.select(simulate).with_column(“Simulation” , simulate) return compute_accidents_test_statistic(table, traffic, “Simulation”) # Run your function once to make sure that it works.simulate_traffic_null()”’can you explain this value error i am getting ValueError: 23.1304347826 is not a label or indexTrying: np.random.seed(100) Expecting nothing ok Trying: np.isclose(round(simulate_traffic_null(), 3), -1.232) Expecting: True Computer Science Engineering & Technology Python Programming CS 85C Share QuestionEmailCopy link Comments (0)


