Homework #4
ASTR 3800
Due February 16, 2016
Correlation Analysis
1. The percentage probability of r (the correlation coefficient) is given in Appendix C of Taylor.
Write a python code that integrates the function that gives the
percentage probability of r. Effectively, write a code that could
be used to generate Table C of Taylor.
2. I have created a text file with x and y pairs in it: correl.txt
Write a program that:
a. opens and reads the data into x,y pairs
b. Estimates the best linear fit values for A,B and r as explained in Taylor or elsewhwere.
c. Plots the points with an overplot of the best fit line.
Then use your code from problem 1 to estimate the cofidence of the correlation.
3. Take only the first ten x,y pairs from correl.txt. Then redo problem 2 with just those pairs.
Turn in your work as plots, with A, B, r, and confidence printed on the plot.