# Bivariate Gaussian - Axses of Ellipses & Prob. Contours

#### TomObserver

##### New Member
Hi,

I found the following link on the web which explains quite well the steps I need to follow to calculate Axes points of probability contours.

pdf

In slide 21 they have calculated eigenvalue and eigenvector but it is not what I get from Octave or C# libraries.

In both cases I get the following vector [-0.965,0.260;0.260,0.965], the values are OK but according to the presentation I should have got [0.965, -0.260; 0.260, 0.965]. The minus sign is in the different position and skewes final results.

Could anyone tell me what additional step I need to take in order to get to the results they have in the presentation?

Slide 24 is basically what I need to do.

#### Dason

What exactly do you mean when you say it skews the final result? It shouldn't actually make a difference.

#### TomObserver

##### New Member
Dason,

In my calculations the eigenvector is different than what they presented. For this reason instead of coordinates of axes i.e. (10.119, 8.619) I get (-10.119, -8.619) from slide 24.

The minus sign in wrong place for eigenvector impacts most of coordinates for Major and Minor axis

Thanks

Tom

#### Dason

Take a minute and think about whether that actually matters. Hint: it doesn't.

#### TomObserver

##### New Member
I am afraid it does because the coordinates I got were something like
10,29 and 0,9 another pair was 0,10 and -10-8

The distances between points don't make sense either.

#### Dason

Dason,

In my calculations the eigenvector is different than what they presented. For this reason instead of coordinates of axes i.e. (10.119, 8.619) I get (-10.119, -8.619) from slide 24.

The minus sign in wrong place for eigenvector impacts most of coordinates for Major and Minor axis

Thanks

Tom
Can you show your actual work? The fact that your eigenvector is the negative of the one you think you should get doesn't actually matter - I guarantee this. But without seeing what you're doing it's hard to diagnose the error you're making.

#### TomObserver

##### New Member
I did exactly what was in the presentation, used the same values.

If you create in Octave/Matlab the following matrix
A = [9,16;16,64];
then
[EVECT,EVAL]=eig(A);

the results will be [-0.965,0.260;0.260,0.965]
but should be, according to the presentation [0.965, -0.260; 0.260, 0.965] (changed the order of rows but it shouldn't matter what matters is that the minus is for -.260 but in my calculations is -.965)

That's the place where I got stuck.

Slide 22 shows exactly what I did but I got different numbers.
evalue = 68.315876539866068;
10.268957758207014,29.533302992473544 > this one is correct but the second pair is wrong
0.26895775820701395, 9.5333029924735442

evalue = 4.6841234601339323
-0.1148044089906417, 11.379679022172891
-10.114804408990642, -8.62032097782711

if you compare these values with the numbers from slides 22 and 23 (blue digits) you will see what I mean.