# Use daily production as a check on whether monthly production goal is likely to be met

This is a real small business problem, not a homework problem.

A monthly production goal is 60000. We want to be sure that say 95% of months meet this goal. The goal is a minimum, so we want to be sure we aren't under this, but we don't care how much we are over.

We want to use daily production as a check on whether we are likely to meet the monthly production goal. We don't really care how low one day's production is as long as other days make up for it, but if we are too low one day it should be a signal that there will be a problem in meeting the monthly production goal.

How do we determine what is too low for daily production?

The simplest approach is to just divide the monthly production by the number of workdays (say 16) to get daily production goals. This works, in the sense of if you meet each daily production goal you will meet the monthly production goal, but it ignores the natural variability in daily production. It is too severe. We should be able to have daily production that is some amount less than this without having to be worried yet.

You can assume a normal distribution of daily production with errors that are independent from day to day, and that we have a history of daily production from which we can estimate the variance in daily production.

For cases like this, I normally tend to a Monte Carlo simulation instead of trying to come up with an analytical solution (update: but here the analytical solution is simple, see below). What I'd do here is to run a number of simulations that estimate the production level at the end of the month based on the production so far and a randomized estimation of the daily production. In pseudo code:

estimated_monthly_productions = []
for i in number_of_simulations:
production = production_so_far
for day in remaining_days:
production += random_daily_production()
estimated_monthly_productions.append(production)


After you've calculated several monthly production estimates, you can check what fraction of them is below your target value. You can also plot a histogram of the estimates, which for example will give you a hint how likely you are to still meet your target if you put in some extra-hours.

The nice thing about the simulation approach is that you can play around with it and extend it easily. For example, you can start with a simple normal random number genarator (with mean and standard deviation based on historic data) for the random_daily_production() function, but switch to a more appropriate distribution (that only yields non-negative values) or a function that also considers the previous days' production (with a time series analysis) to account for trends in the productivity.

Update: I just realized that for the simple case, the analytical solution actually is very simple: The production at the end of the month is the production so far plus the sum of $n_{days}$ equally distributed, independent random values. If you assume that each daily production is distributed according to $N(\mu, \sigma)$, you've already produced $prod_{so far}$ and there are $n_{days}$ working days left, then your production at the end of the month will follow[1] $$prod_{so far} + n_{days} \cdot N(\mu, \sigma) = N(prod_{so far} + n_{days}\cdot\mu, \sqrt{n_{days}}\cdot\sigma).$$ It quickly gets more complicated if you remove the assumptions of independent, normally distributed production levels for each day, then the simulation will be easier.

[1] This notation should be understandable intuitively, but it looks really sloppy to me. How can I improve it?