Giter Site home page Giter Site logo

botprof / plotting-uncertainty-ellipses Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 2.27 MB

This Jupyter notebook demonstrates how to properly plot uncertainty (confidence) ellipses for 2D normally distributed data.

License: MIT License

Jupyter Notebook 100.00%
confidence-ellipse plot plotting-uncertainty-ellipses uncertainty sample-ellipse uncertainty-estimation jupyter-notebook ipynb matplotlib statistics

plotting-uncertainty-ellipses's Introduction

How to Properly Plot Uncertainty Ellipses for 2D Normally Distributed Data

This notebook demonstrates how to properly plot ellipses that represent desired levels of uncertainty as given by the covariance matrix of normally distributed data in 2D. The reason for this note is that I have seen others naively extend 1D covariance bounds to 2D, which is not technically correct. The example is written in Python and uses Matplotlib.

Main Files

Sample Output

Here is an example 95 % confidence ellipse for 1000 sample points.

Sample ellipse

References

You can find a similar but partial treatment of this problem on the Matplotlib page called "Plot a confidence ellipse of a two-dimensional dataset". Vincent Spruyt also has a really nice and complete description on his page called "How to draw a covariance error ellipse?". We also employ the book Johnson and Wichern (2007) Applied Multivariate Statistical Anlaysis (6th ed.), Chapter 4, Result 4.7 on page 163.

Cite this Work

You may wish to cite this work in your publications.

Joshua A. Marshall, How to Properly Plot Uncertainty Ellipses for 2D Normally Distributed Data, 2020, URL: https://github.com/botprof/plotting-uncertainty-ellipses.

You might also use the BibTeX entry below.

@misc{Marshall2020,
  author = {Marshall, Joshua A.},
  title = {How to Properly Plot Uncertainty Ellipses for 2D Normally Distributed Data},
  year = {2020},
  howpublished = {\url{https://github.com/botprof/plotting-uncertainty-ellipses}}
}

License

Source code examples in this notebook are subject to an MIT License.

plotting-uncertainty-ellipses's People

Contributors

botprof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.