Paired t-test
Think back to the potato field example that we dealt with previously. Here, you've been provided with a small DataFrame (podataframe
) containing information on 10 Field
s. We are interested in potato yield in tons/hectare. For each Field
, we have a value for its Yield2018
, before the application of a new fertilizer, and its Yield2019
, after the application of the new fertilizer. You'll need to perform two t-tests, a standard two-sample test, and a paired t-test. A paired t-test will control for the variation between fields. Do the two tests give the same result? scipy.stats
is loaded as stats
.
This exercise is part of the course
Performing Experiments in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Perform independent t-test
ttestind = ____
print(____)