The first way to test a hypothesis is by performing a controlled experiment. This would involve selecting a dependent variable and investigating how an independent variable affects the dependent variable. All other factors must be kept constant, or as control variables. A method or procedure must be developed focused on the research question, and a conclusion is formed.
The second way to test a hypothesis is by gathering data. This can be any form of data, consistent within one or a few specific categories. This data must then be collected, recorded, and compared to determine if the data holds any significant information. The data is carefully analyzed to form a conclusion based on any patterns or observations that the data conveys. While data is also collected when performing a controlled experiment, this method of gathering data can be done without an experiment, by obtaining data observationally or looking at data from a number of experiments that have already been carried out.