Lesson 6: How do we find the equation of a line?
How do we find the equation of a line?
You learned about libraries in lesson 3. We can use the scipy library to find the equation of this line. This function will return the values for the slope, the y-intercept, and a value called R^2. R^2 is always a number between zero and one. A value of zero tells you that your data doesn’t remotely follow a line while a value of 1 means your data lies on a perfect line.
What do you think the R^2 value for the data you graphed in part 2 is?
Let's test it. I've shown the code below. Remember that the slope of the line is the rate constant, which we call k.
In real science, things aren’t quite this nice. Even the most careful scientists with the best instruments don’t measure exactly accurate values every time. There is some uncertainty in all measurements, and we call this noise. The third column of the cvs file (called C14_Con_noisy) has some uncertainty built into the measurements. Try repeating the steps you’ve already done for this data. What does the curve of C-14 concentration v time look like? What does the best-fit line look like? What is the new R-squared value? What about your rate constant? Make a prediction, and then try figuring it out below!
You can check out my solution below
The R-squared value dropped! It is still pretty close to 1, so we can say the correlation is pretty good. I've copied the graphs below.
Notice how the noise gets bigger by 12,000 years. As the sample gets older, you are measuring smaller and smaller amounts of carbon-14. That makes it harder to tell how much of your measurement is "real" and how much is just noise. On samples that are too old, scientists can't use carbon dating to tell the age at all, and have to use other techniques. Next we will talk about half-lives and how they can help us carbon-date old samples.