B. to test a hypothesis
The main objective of an experiment is to test a hypothesis, which is a proposed explanation for a phenomenon. While making observations, analyzing data, and drawing conclusions are important aspects of the experimental process, the central aim is to see whether the hypothesis is supported or refuted by the experimental results.