In this section the task is to calculate P^ z1-alpha/2 …

I am having trouble calculating correct Z1. I have to go back and check all the videos (in the absence of course pdf) to see what it means. if someone can help me how to calculate this part or point me to the lecture where it is mentioned how to do it.

I figured it out, make sure to watch the video “Confidence Intervals for Proportion”, the last video of Lesson 1, especially the second half of the video. You should get everything from that to proceed.

Also, per @Jos comment, yes, the formula as written is confusing to look at, but it is Z and the subscript is (1 - alpha / 2), which is in fact a formula to passed into the function call, and then that is used to compute the upper and lower values.

The trouble I’m having with #9 is not with the formulas, but with the variables…

Is p-hat the same as ‘pp’ from Exercise 7?

And is z the same as ‘z’ from Exercise 7?

And is ‘n’ the same n=len(data) we’ve been using all along?

The output I’m getting is the same for both control_metrics and variation_metrics, which leads me to believe that at least p-hat is not the same as pp.

The p-hat from exercise 9 is not the same as the one from exercise 7. The ‘pp’ variable from exercise 7 was a probability combination of the control and variation metrics, whereas the p-hat from exercise 9 is calculated separately for each of those metrics. I hope it makes sense.

The values are slightly different between Expected and Got, but rounded up, they are the correct in the assignment. Does anybody know why the values are slightly different?

I think more context would be helpful for us to troubleshoot. If you use the provided hint of the z function stats.norm.ppf and the square root function np.sqrt, I don’t see how there could be rounding errors.

yes i used stats.norm.ppf and np.sqrt, and the values I get are extremely close to test values, close enough to round correctly, but not exact so the answer is wrong. Very strange…anyway everything else is correct so I passed the assignment.

Congratulations on passing the assignment! I was thinking about a possibility that the way p and n were retrieved might’ve caused this issue. Please give us an update if you ever solved this issue.