koaning / calmcode-feedback

A repo to collect issues with calmcode.io
12 stars 0 forks source link

An extra 'p' in y formula? #157

Closed jonnross88 closed 2 years ago

jonnross88 commented 2 years ago

There is an extra p in the plot which compares 2 probabilities. is that true or a typo?

image

image

Taken from https://calmcode.io/diseases/interact.html It was taken from the 'extra' portion and you chose not to label the y-axis, so I am not sure if you were trying to show something else.

koaning commented 2 years ago

There indeed seems to be a y-axis missing, so that's fair to add.

But the legend makes sense to me. You're comparing two probability lines, so it helps to distinguish.

jonnross88 commented 2 years ago

I agree, the legend makes sense. The part which confused me was the 'p' outside the parentheses in gp(1-p)g. Likewise for the '0.02' in g0.02(1-0.02)g. I was expecting g*(1-p)*g and g(1-0.02)**g respectively. Great content btw. I enjoy your teaching style and content.

koaning commented 2 years ago

Ah, now I see! Thanks for reporting.

I'll need to manually check that, but it's added to the TODO :)

koaning commented 2 years ago

Fixed in an upcoming PR.