We have historical data from the past nine months that is broken down by material, size, and hours it took to produce that specific piece. Let's say we have products that come in many sizes and are made of one of four different kinds of metal (X1,X2,X3,X4). Currently, I have a linear regression equation for each size of each material. But we would like one equation that can cover everything.

If I know we will produce 700 units of product 1, 400 units of product 2, 200 of product 3, and 350 of product 4, how do I create coefficients that will give us a good estimate of hours.

hours = B1(700) +B2(400) + B3(200) + B4(350)

Do the coefficients come from historical averages? Could I somehow consolidate many simple linear equations (y=mx + b) to create a more general equation?

Any suggestions are greatly appreciated.