Introduction to Basic Statistics

This session is about practical statistics (mean, median, histogram). The practical part is to make sure you can read ASCII data files (and address unix to dos and vice versa issues). Henceforth we will assume that you will be computing under an UNIX enviroment. You can use either Python or MATLAB or both.

Please have all this finished by the class tomorrow.

  1. The file consists of Gaussian random variates with the MATLAB "randn" tool. View the file. Use UNIX tool (header, sed) to strip out the header lines. Use UNIX tool wc to count the number of variates. Histogram the data. Determine the mean, median and rms.
    SRK Presentation.
  2. The file consists of Poisson variates(lambda=1). Histogram the data. Determine the mean, median and rms.
    SRK Presentation
  3. We discussed in the class that the flux measurements can be characterized as f+/-<df> where <df> is the mean and df is the noise and can be regarded as zero-mean Gaussian with a sigma (to be determined from observations). The error in magnitude is dm = -2.5*log10(1+df/<df>).
    By construction, df/<df> is Gaussian with zero mean and rms of sigma/<df>. Note that the signal-to-noise ratio (SNR) is simply <df>/(sigma/<df>)=1/sigma. You will find that as the SNR decreases the histogram of dm becomes skewed. SRK Presentation