A statistical hypothesis test is a method of statistical inference used to decide whether the data provide sufficient evidence to reject a particular hypothesis. A statistical hypothesis test typically involves a calculation of a test statistic. Then a decision is made, either by comparing the test statistic to a critical value or equivalently by evaluating a p-value computed from the test statistic. Roughly 100 specialized statistical tests are in use.
Definition of terms
The goal of a hypothesis test is to establish whether certain properties of a statistical population are true by examining sample data. Typically, the population is modelled by a random variable whose distribution has unknown parameters. For example, a medical trial may wish to establish whether a particular drug is effective in treating high blood pressure, with "the change in blood pressure observed in a patient who takes the drug" being the random variable. An example hypothesis could be "the mean change in blood pressure is zero" or "the mean change in blood pressure is negative". In general, any statement about the parameters describing a population can be a hypothesis (but not a statement about the sample). The test compares two hypotheses: a default null hypothesis (denoted H0) and its negation, the alternative hypothesis (H1). It is usually consistent with the research hypothesis because it is constructed from literature review, previous studies, etc. However, the research hypothesis is sometimes consistent with the null hypothesis. The null hypothesis and alternative hypothesis are two mutually exclusive statements. "The statement being tested in a test of statistical significance is called the 'null hypothesis'. The test of significance is designed to assess the strength of the evidence against the null hypothesis. Usually, the null hypothesis is a statement of 'no effect' or 'no difference'." If the sample data are consistent with the null hypothesis, then you do not reject the null hypothesis; if the sample data are inconsistent with the null hypothesis, then you reject the null hypothesis and conclude that the alternative hypothesis is true. Typically the test will select a null hypothesis that the intervention being studied has no effect, or that the population parameter takes some "obvious" value. A test statistic is computed from the given sample data, and the tester calculates the conditional probability of observing a value at least this extreme, supposing the null hypothesis is true. If this probability (called the p-value) is less than the significance level of the test (denoted α {\displaystyle \alpha } ), then the null hypothesis is rejected. The test does not conclude that the null hypothesis is false, or that the probability that the null hypothesis is false is less than α {\displaystyle \alpha } . Because it is usually impossible to definitely establish whether the hypothesis being tested is true or false from a sample, the conclusion of a hypothesis test is not certain to be correct. There are two possible classes of error:
A type I error, in which the null hypothesis is rejected despite the null hypothesis being true, with probability α = P ( reject H 0 | H 0 ) {\displaystyle \alpha =P({\text{reject }}H_{0}|H_{0})} . This is the same as the significance level of the test. A type II error, in which the null hypothesis is accepted despite the alternative hypothesis being true, with probability β = P ( accept H 0 | H 1 ) {\displaystyle \beta =P({\text{accept }}H_{0}|H_{1})} . The quantity 1 − β {\displaystyle 1-\beta } is called the power of the test. Some further definitions:
Simple hypothesis: Any hypothesis which specifies the population distribution completely. Composite hypothesis: Any hypothesis which does not specify the population distribution completely. Positive data: Data that enable the investigator to reject a null hypothesis.
… excerpt ends here. Continue reading the full article.

