Independent sample T-test for python data analysis and python Data Analysis

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.