Independent sample T-test for python data analysis and python Data Analysis
First, obtain the output data of different corn in two minutes.
Because python's pandas package is used, you need to introduce the pandas package before reading data.
Figure 1
Different corn kernels are represented by a B. The first five rows of data are read below.
Figure 2
The corn yield of both varieties A and B is assigned to X and Y respectively.
Then, use the levene function in the scipy. stats package to check whether the data variance is homogeneous.
The result shows that the P value is 0.85 and greater than 0. 05. The variance is homogeneous.
Directly use the ttest_ind function in scipy. stats for test. The result shows that the P value = 0.33 is greater than 0.05, so there is no difference between the two types of corn production.
Okay, it's over! If you have any questions, please let me know in the comments area. A selfie is attached. 0.0