3AM stats quiz

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz

Because I’m tired and easily amused.

library(mvtnorm) bivn ← mvrnorm(100000, mu = c(0, 0), Sigma = matrix(c(4, 0, 0, 1), 2, 2)) bivn.kde ← kde2d(bivn[,1], bivn[,2], n = 100) image(bivn.kde); contour(bivn.kde, add = T)

Comment

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=tdrWJeAPbxcHK98PY

The ellipses of constant probability density are (x/​4)^2 + y^2 = constant. The one tangent to x=4 is tangent at (4,0) so it’s (x/​4)^2 + y^2 = (4/​4)^2 = 1. When x=0 this means y^2 = 1, so it passes through y=+-1.

I confess that it doesn’t seem particularly amusing.

Comment

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=P77mHTYp7tZaRq9Y5

You’re right, and I’m wrong. It was 3AM. It was amusing only because I had convinced myself from some graphs that the answer wasn’t y=+-1, which I’d been fairly certain it ought to be.

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=qzg9nzx3BsXiiNEoW

Apologies; I get lost at step 3. Probably because I don’t know stats that well. Hope this feedback helps.

Comment

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=Ed5Yq88zkK44pNfQd

I guess, what is meant by (I could be wrong though) is the joint probability distribution of X and Y which would look something like this but centered at the origin and there would be a surface where the height represents the probability density. (Also, ignore that the ellipse in this visualization is oddly rotated.) The contour lines are the ellipses you get by slicing the surface with a horizontal plane.

Comment

That picture helps. Clarification: Now after step 3; Tangent in which plane? (I worked it out) turns out I didn’t know what, " contour line" or precisely what "tangent" meant. (I guess I am rusty on my math)

Given that X and Y are values of unknown magnitudes; is this possible? (I suspect if I think about it for a day it will come to me)

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=ExwwdNvD2ak6FkB5q

Used rot13 to avoid spoilers:

K unf qrafvgl N * rkc(-k^2 /​ 32) jurer N = 1/​(4 fdeg(2cv))

L unf qrafvgl O * rkc(-l^2 /​ 2) jurer O = 1/​fdeg(2*cv)

Fvapr gurl’er vaqrcraqrag gur wbvag qrafvgl vf gur cebqhpg bs gur vaqvivqhny qrafvgvrf, anzryl NO * rkc(-k^2 /​ 32 - l^2 /​ 2). Urapr, gur pbagbhe yvarf fngvfsl -k^2 /​ 32 - l^2 /​ 2 = pbafgnag. Nofbeovat gur artngvir vagb gur pbafgnag, jr trg k^2 /​ 32 + l^2 /​ 2 = pbafgnag, juvpu vf na ryyvcfr jvgu nkrf cnenyyry gb gur pbbeqvangr nkrf.

Guvf vf gnatrag gb gur yvar K = 4 ng gur cbvag (4,0). Fhofgvghgvat vagb gur rdhngvba sbe gur ryyvcfr, jr svaq gung gur pbafgnag vf 1⁄2, fb k^2 /​ 32 + l^2 /​ 2 = 1⁄2. Frggvat k = 0 naq fbyivat sbe l, jr svaq gung l = 1.

Comment

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=QxA46J4dazjTjJLoP

Small quibble: +- at the end.

[EDITED to be less spoilery.]

Comment

Of course. I seem to have overlooked that.

https://www.lesswrong.com/posts/4EBRtD94rYzayyGsB/3am-stats-quiz?commentId=oQ6oBh3n9vSv2J24a

You’re right. That’s what I expected, but not the answer I was getting. I was plotting bivariate distributions, it was 3AM, and a parameter that I thought was a standard deviation was a variance.