The derivation process is as follows:
Single-sample T test is used to compare the sample with the population and check whether the sample comes from the population.
For example, compare the results of some students in Class A with the overall results to see if these students are suitable to continue studying in Class A.
T test of two independent samples is used for two samples from different populations to test whether there is statistical difference between the two populations;
For example, choose some students from Class A and Class B to compare their scores and see if there is any difference in the overall scores between Class A and Class B. ..
Both tests need to satisfy normal distribution and homogeneity of variance, and the output results are both t value and p value, with no difference.
Extended data:
Population and sample
For example, water samples taken from well water or river water in water quality inspection, and blood or other living tissue samples taken from patients in clinical tests are samples; All the water in a complete well or a certain section of a river, all the blood in a patient's body or an organ, is a whole.
This kind of crowd is concrete, while other people are imaginary and exist only in theory. For example, to test the efficacy of a new drug to treat influenza, the first batch of influenza patients, no matter how many, are just a sample.
If the efficacy of the drug is affirmed and popularized, then all influenza patients who receive the drug under the same conditions will belong to this group. However, when it was first tried, this crowd did not exist, it was imaginary.
Generally, there are a large number or even infinite observation units. In practical work, it is generally impossible or unnecessary to study each observation unit one by one.
We can only extract some observation units for actual observation or investigation, and then infer and estimate the overall situation according to the observation and research results of these observation units.
For example, in the above example of the new drug for treating influenza, only a limited number of patients were treated, but the conclusion should be extended to all people, and the curative effect of the drug on all influenza patients should be known regularly. Therefore, the purpose of observing samples is to infer the whole, which is the dialectical relationship between samples and the whole.
Generally speaking, the content of the sample is related to the unit. For example, the eyesight survey of 300 middle school students in a middle school, the sample is the eyesight of 300 middle school students, and the sample size is 300.
Baidu Encyclopedia-Sample
Baidu Encyclopedia-Independent Sample