The common method to formulate compound feeds is linair programming. From all the raw materials available we calculate the combination that meets the different requirements that we need in that feed (energy, protein, amino acids etc) at the lowest cost price.

However, when we calculate the most optimal combination we have to deal with the variation in the different raw materials. To put it in a simple example, lets assume that we have two raw materials, one with 10% protein and one with 20% protein. If we want to have a minimum protein level of 15% in the feed we would come up with a mixture that contains 50% of the raw material with 10% protein and 50% of the ingredient with 20% protein. In real life lineair programming deals with a high number of ingredients and a high number of requirements, giving a much more complex calculation that also deals with cost price, but in principle it boils down to this.

However, not all raw materials have a completely fixed level of in this case protein, but there is a certain variation in the raw material, which makes the first ingredient for instance being variable between 9 and 11%, and the second variable 19 and 21% protein. On average this will still result in an average protein level of 15%, but there is a chance that we use both 9 and 19% protein variants of the raw material, resulting in on average 14% protein level instead of the requested 15%.

To avoid this, linear programming takes a correction factor that is based on the standard deviation of the spread in in this case protein. But as it does this for every factor and every ingredient, we see that the correction factors are adding up and are making the compound feed actually more safe than what we initially had in mind.

Stochastic or non-linear programming approaches this problem differently. In stead of making a correction factor for every individual feed compound and adding them up to an in total more safe feed than initially intended, it calculates with the individual standard deviations of the feed components. In this way the total standard deviation of the compound feed is used as a safety margin to make sure that the feed meets the minimum requirements with a calculated error in the specs.

The big difference between the two methods is that a safety margin in feed formulation is costing money, it makes the feed more expensive. This means that making the feed more safe than initially planned by adding up the different safety margins is making the feed more costly than absolutely needed. That is why stochastic programming normally results in cheaper feeds, because it calculates with the required safety margin of the total feed for the different ingredients, instead of calculating with the safety margins in the separate components of the raw materials.

Although linear programming is the standard method to do feed formulation, most feed formulation programs have an option to do stochastic programming, and that can sometimes be interesting from the point of cost reduction without increasing the risk to not meet the requirements.