Comparing a sample distribution to an implied distribution I have a task that is specific to inventory management that is currently driving me crazy. To summarize the problem: We regularly must monitor inventory settings to ensure that they represent true demand, to ensure that we are not overstocking nor understocking. The standard procedure is to schedule reviews, where high volume items get reviewed monthly, and low volume items quarterly. But the vast majority of SKUs don't get adjusted; less than 9% are adjusted after each review...meaning that 91% of SKUs do not have a significant change in their demand patterns to warrant any change in their inventory parameters. I'm trying to design a filter so that instead of reviewing every SKU, I only review the SKUs where demand patterns have likely changed from their previously implied demand.
To give background into the domain of inventory management:
1) Inventory SKUs have settings that manage their stock levels given a specified depletion rate and variability. There are practical parameters (eg. lead times) as well as calculated parameters (eg. avg daily demand), and often heuristic parameters (eg. targeted in stock rate). 
2) Generally speaking, if I know all of the currently used parameters (or even n-1), I know the implied demand distribution that results in those parameters. For example, if I have a safety stock of 96 units, avg daily demand of 10, lead time of 5 days, and a target in-stock rate of 98%, and demand is normally distributed, then I know that the implied demand can be represented by a normal distribution with mean of 10 and standard deviation of 10. 
I'm trying to find a method that can help me assign probabilities that a sample of demand came from an implied demand distribution with explicit parameters. Is there a way to calculate this probability? It sounds like a conditional probability problem, but I'm not sure how to construct a calculation to determine conditional probabilities using parameterized distributions. 
To phrase this question as an example: 
If my last 10 days of demand are c(6,7,7,5,7,8,9,4,4,9), what is the probability that this sample came from a normally distributed population with mean of 5 and stdev of 3? 
 A: That's a familiar problem from a previous life!  
First, you're not going to be able to do exactly what you want, which is to come up with a probability that the observations could have come from a specified distribution etc.  This is because you don't have a well-specified alternative distribution, one which the data comes from if all is not well.  There are too many ways things could go wrong to come up with such a distribution easily, but without it, you have nothing to use to help you say something like "this collection of observations is more likely to have come from the inventory error demand distribution than from the regular demand distribution."
Having said that, though, you can still calculate $p(\text{new data} | \text{estimated parameters})$ and use that, along with the monetary value of the nominal on-hand inventory, to develop a ranking system for cycle counting the SKUs.  There will undoubtedly be some trial-and-error involved, as low probabilities can be due to errors in the inventory records or misspecification of the probability distributions (or chance), and you want to count the former cases but not the latter cases.
In R, such a calculation, for your example, could be:
NewData <- c(6,7,7,5,7,8,9,4,4,9)
EstMean <- 5
EstSD <- 3
exp(sum(dnorm(NewData, EstMean, EstSD, log=TRUE)))

Having written that, I would highly recommend using the negative binomial distribution in preference to the Poisson for mean demands < 10 or 15 or so (and something continuous for higher demand levels.)  In a long life of inventory control, I have only seen a situation where demands were well-modeled by a Poisson distribution once.  The Gamma, too, has problems, since zero demands are not possible if demands are truly distributed Gamma, but stockouts do occur... in fact, I've found zero-inflated negative binomial distributions tend to fit a wide range of SKUs better than the standard form, and of course with the Gamma and (truncated) Normal also.
A: Look at the ks.test function for one option of comparing data to a given continuous distribution (with predefined parameters).  Look at the vcd package for tools to examine discrete distributions.
