In 1915 Einstein published his theory of General Relativity. Why it completely reformulated our understanding of gravity, it had very few predictions because we live in a relatively weak gravitational field. One prediction it did make was that light should be bent by gravity and the deflection from a point mass should be 2GM/c. A phenomena we now call gravitational lensing.
At the time the only way this could be measured was for stars deflection from the Sun. But of course one can’t see stars near the Sun. The only way to observe this was during a total solar eclipse. An expedition set out to do this in 1919 and claimed to measure this deflection during a total solar eclipse validating the theory of General Relativity. Since then many other groups have performed the same experiment most recently in 1975.
The positions and deflections of the stars from the 1975 observations can be found here. The last 3 columns are the most important, they are the deflection for that star, the weight for that star and the distance from the Sun in solar radii for that star. The weights are based on the stars brightness as brighter stars positions can be more accurately measured.
Fit a power law, Cr-a, to the deflection as a function of distance using the given weights. Find the parameters and the value of χ2. Now why this is the best value of χ2 the question of how much worse would χ2 for other parameters still remains. To calculate this evaluate χ2 for a grid of a and C values around your best fit parameters. Then make a contour plot, plt.contour(), of your values. Show levels that are 1, 2 and 3 higher than your minimum in terms of χ2 / degree of freedom.