There are several steps to the scientific method. First, you observe something, and then you formulate a question that you will research. You then formulate a hypothesis based on what you expect, or predict, will happen given your observations and the nature of the system. Once a hypothesis is formed, experiments can be conducted to see if the hypothesis holds true. There are many ways to state a hypothesis, but in all cases hypotheses are testable statements.

Formulate a question based on your observations. For instance, you observe that cows fed a certain supplement produce more milk. Your question would be "Do cows that are fed supplement X produce more milk?"

Determine your dependent and independent variables. Dependent variables are those you are measuring, or those that depend on the conditions you are manipulating (which are the independent variables). In our example, supplement X would be our independent variable; milk production would be our dependent variable (that is, what we are measuring).

Determine whether you are going to write a onetailed or a twotailed hypothesis. Onetailed hypotheses are predictions in one direction. For instance, "supplement X will increase milk production" is a onetailed hypothesis because the prediction is that milk production will increase. If you had expected a decrease, it would still have been a onetailed hypothesis, only in the other direction. Twotailed hypotheses are used when the direction of the response is not predicted. For instance, "a diet containing supplement X will affect milk production in cows" is a twotailed hypothesis because you are predicting only a change, not a specific change in one direction or another.

Write your hypothesis. It should take an ifthen format; that is, if X happens then Y will be observed. Make sure that X is your independent variable and Y is your dependent variable. Also keep in mind whether your hypothesis is one or twotailed. In our example, an appropriate hypothesis would be "If supplement X is fed to cows, milk production will increase." This is a onetailed hypothesis, because we are predicting an increase.
Tips & Warnings
 Hypotheses should not be confused with theories, which are statements that are based on many data. Hypotheses are testable notions.