Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What if the covariance matrix is singular? #7

Open
Yu-Xiaoxian opened this issue Apr 26, 2020 · 2 comments
Open

What if the covariance matrix is singular? #7

Yu-Xiaoxian opened this issue Apr 26, 2020 · 2 comments
Assignees

Comments

@Yu-Xiaoxian
Copy link

Yu-Xiaoxian commented Apr 26, 2020

In Ch.3 assignment 1.3, at t=1, the covariance matrix [0.25, 0.5; 0.5, 1.0] is a singular matrix. When we want to calculate its gaussian probabilistic, we need the matrix to be invertible. How can we deal with this situations.

@pptacher pptacher self-assigned this Apr 26, 2020
@pptacher
Copy link
Owner

pptacher commented May 6, 2020

Hi sorry for slow response. In 1 dimension when σ → 0 the normal distribution with mean 0 converges (in distribution, weak convergence) to the delta dirac distribution: all the probability mass is concentrated in 0.
We can generalize in 2d when 1 eigen value of the covariance matrix is null the 2d gaussian actually degenerates to a 1d gaussian with all probability mass concentrated on a line (direction defined by eigenvector corresponding to the non null eigenvalue).(corrected a typo in the P matrix). So the uncertainty ellipse becomes a bounded interval on a line.
Does this clarify ? is it the point you wanted to make ?

@Yu-Xiaoxian
Copy link
Author

Your replay is beyond my point. The probability mass center explain the covariance matrix very clear, thanks.

When I use random module of Python to sample from normal distribution, I add a tiny diagonal matrix to the covariance matrix, making it ill but not singular, so it becomes invertible. And the result shows exactly what you've said, the sample points centered in a line.

Thanks again for your replay, that makes the result more clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants