To ensure that your results are valid, consider the following guidelines when you collect data, perform the analysis, and interpret your results.
In statistics, random samples are used to make generalizations, or inferences, about a population. If your data are not collected randomly, your results may not represent the population. For more information, go to Randomness in samples of data.
If your data classify each observation into one of two categories, such as pass/fail, use 2 Proportions. For more information on data types, go to Data types you can analyze with a hypothesis test.
For observations to be independent, the probability of a particular outcome does not depend on any previous outcome. For example, if you select two parts and record whether they are defective or not, the outcome of the second part should not depend on the outcome of the first. If your observations are not independent, your results may not be valid.