Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 915773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:56:38+00:00 2026-05-15T17:56:38+00:00

Here is the setup. No assumptions for the values I am using. n=2; %

  • 0

Here is the setup. No assumptions for the values I am using.

n=2; % dimension of vectors x and (square) matrix P 
r=2; % number of x vectors and P matrices
x1 = [3;5]
x2 = [9;6]
x = cat(2,x1,x2)
P1 = [6,11;15,-1]
P2 = [2,21;-2,3]
P(:,1)=P1(:)
P(:,2)=P2(:)
modePr = [-.4;16]
TransPr=[5.9,0.1;20.2,-4.8]

pred_modePr = TransPr'*modePr
MixPr = TransPr.*(modePr*(pred_modePr.^(-1))')
x0 = x*MixPr

Then it was time to apply the following formula to get myP
alt text

, where μij is MixPr. I used this code to get it:

myP=zeros(n*n,r);
Ptables(:,:,1)=P1;
Ptables(:,:,2)=P2;
for j=1:r
    for i = 1:r;
        temp = MixPr(i,j)*(Ptables(:,:,i) + ...
        (x(:,i)-x0(:,j))*(x(:,i)-x0(:,j))');
        myP(:,j)= myP(:,j) + temp(:);
    end
end

Some brilliant guy proposed this formula as another way to produce myP

for j=1:r 
  xk1=x(:,j); PP=xk1*xk1'; PP0(:,j)=PP(:);
  xk1=x0(:,j); PP=xk1*xk1'; PP1(:,j)=PP(:);
end
myP = (P+PP0)*MixPr-PP1

I tried to formulate the equality between the two methods and seems to be this one. To make things easier, I skipped the summation of matrix P in both methods .
alt text

where the first part denotes the formula that I used, and the second comes from his code snippet. Do you think this is an obvious equality? If yes, ignore all the above and just try to explain why. I could only start from the LHS, and after some algebra I think I proved it equals to the RHS. However I can’t see how did he (or she) think of it in the first place.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:56:38+00:00Added an answer on May 15, 2026 at 5:56 pm

    Using E for expectation, the one dimensional version of your formula is the familiar:

    Variance(X) = E((X-E(X))^2) = E(X^2) - E(X)^2
    

    While the second form might be easier programming, I’d worry about ending up with a negative (or, in the multidimensional case, non positive definite) answer by using it, due to rounding error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the setup I tried using CMake 2.8.2 to reproduce the problem: /test.sh:
I need to set up an amazon server. I always here setup ubuntu on
I have a page that i have been starting to setup here http://www.brandybrowauto.com/NEW.html that
Here is my setup: I have modeled my application after the SportsStore in Pro
Here is my setup, it seems I am not binding the data correctly. The
Here's the setup. I have a custom UIScrollView as a subview of PrimeView. The
Here's the setup. I have web site which is essentially a simple CMS. Here
Here's the setup : http://jsfiddle.net/AndyMP/rVrjY/ What I'd like to achieve is a shadow on
So I have a simple setup going here where I load up a file
Okay, here's the setup: I work in HPC, and we're preparing for the need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.