Lecture 2 Basic Statistics

15
Lecture 2 Basic Statistics Jayant Murthy The Indian Institute of Astrophysics www.iiap.res.in [email protected]

Transcript of Lecture 2 Basic Statistics

Page 1: Lecture 2 Basic Statistics

Lecture 2Basic Statistics

Jayant MurthyThe Indian Institute of Astrophysics

[email protected]

Page 2: Lecture 2 Basic Statistics

Recommended Reading

● Philip Bevington & D. Keith Robinson:Data Reduction and Error Analysis for the Physical Sciences

● John R. Taylor: An Introduction to Error Analysis

Page 3: Lecture 2 Basic Statistics

Different Types of Error

● Illegitimate errors:– Irreproducible errors.

● Systematic errors:– Often due to experimental bias or measurement

errors.

● Random errors:– Measurement or statistical uncertainty.

Page 4: Lecture 2 Basic Statistics

Random Numbers

● Write a program to flip coins:

● Random numbers– If seed is undefined,

get pseudo random numbers.

– If seed is defined, get the same number.

Note that seed is different in IDLbut the concept is the same.

Page 5: Lecture 2 Basic Statistics

Use Vectors

Page 6: Lecture 2 Basic Statistics

Heads or Tails

What is wrong in the above program?

Page 7: Lecture 2 Basic Statistics

Vector Shortcut

Page 8: Lecture 2 Basic Statistics

Monte Carlo Tests

Page 9: Lecture 2 Basic Statistics

More Monte Carlo

Page 10: Lecture 2 Basic Statistics

More Monte Carlo

Page 11: Lecture 2 Basic Statistics

More Monte Carlo

Page 12: Lecture 2 Basic Statistics

More Monte Carlo

Page 13: Lecture 2 Basic Statistics

Effects of Sample Size

Page 14: Lecture 2 Basic Statistics

Do it with Style

Page 15: Lecture 2 Basic Statistics

Central Limit Theorem

● If we take a large enough sample of independent random numbers, the distribution of their mean (μ) will approach a normal distribution with mean μ and standard deviation σ/sqrt(N).