Decipephering Notation and plugging in values for ellipse formula

32 Views Asked by At

Premise

I had asked a question on stats exchange about calculating error ellipses for a given scatter plot. I got an answer that seems acceptable, but I'm having trouble implementing it because my math notation literacy is very weak, and I think it would be undue burden for the answerer to painstakingly explain the formula. Thus I decided to make deciphering the formula into a question in and of itself. Math SE seems to be most appropriate for this.

The descriptive stats are:

  • $n = 321$
  • $\mu_{x} = 7.60$
  • $\mu_{y} = 11.38$
  • $\sigma_{x} = .34$
  • $\sigma_{y} = .44$
  • covariance matrix ${} = \begin{bmatrix} .12 & .10 \\ .10 & .19 \end{bmatrix}$
  • ordered eigenvalues ${}= 1.66,~ 0.34$

And I was told that the formula for creating the ellipse was:

$$z_y = \rho z_x\pm \sqrt{1-\rho^2}\sqrt{2\ln(\frac{1}{1-q})-z_x^2}$$ where $z_y = (y-\mu_y)/\sigma_y~,~z_x = (x-\mu_x)/\sigma_x~$, and $\rho = .10 /\, (.34 \ast .44)$. Which should result in something that looks like this:

enter image description here

What I tried to do is plug in my descriptive stats for each part of the formula. Some parts left me scratching my head however. Here is what I have:

$$(y-11.38) = (.10)*(x-7.6) \pm \sqrt{1-(.10)^2)} \sqrt{2\ln(\frac{1}{1-q})-(x-7.6)^2}$$

Question

I'm not sure what $q$ supposed to be. I tried to research common notation for $q$ but only found that: $q$ denotes sample elements that do not have attributes. I don't see how that applies to my situation. Given my descriptive stats at the top of the post, how do I find $q$ for this formula? And is my plugging in right so far?

I have a hunch, but I'm also not totally sure what I'm subtracting the x and y means from in the term $z_y = (y-\mu_y)/\sigma_y$. Let's look at the case for y for instance: Is $y$ here the sample y from my actual sample observations, or something else?

Optional side question: Is there anything in this formula that has bearing on the orientation of the ellipse? Or is this only the equation for an axis-aligned ellipse?