The Transition Matrix for a sales Probability Distribution Example

A company makes expensive products for which the monthly demand  
\[D_i\]
  is low and intermittent. The total monthly demand is a random variable with the following probability distribution.
 
\[D_i\]
 
0 1 2 3
 
\[P(D_i)\]
 
1/9 6/9 1/9 1/9
The company makes one device per month. When the inventory level reaches 3, production stops until the inventory level drops to 2. If the status of the system is the inventor level, what is the transition matrix?
We need to complete the table.
Month  
\[n+1\]
\Month  
\[n\]
 
0 1 2 3
0        
1        
2        
3        
To complete the table start with the first row. If there are initially 0 in stock, the output is one. If demand is greater than or equal to 1 (with probability 8/9) then the state in month  
\[n +1\]
  is zero, and if demand is zero, (with probability 1/9) the state in month  
\[n+1\]
  is 1. The state in month  
\[n+1\]
  cannot be 2 or 3, so the entries must be zero. We can complete the first column.
Month  
\[n+1\]
\Month  
\[n\]
 
0 1 2 3
0 8/9      
1 1/9      
2 0      
3 0      
If there is initially 1 in stock, the output is one. If demand is greater than or equal to 2 (with probability 2/9) then the state in month  
\[n +1\]
  is zero, and if demand is 1, (with probability 6/9) the state in month  
\[n+1\]
  is 1. If demand is zero (with probability 1/9) the state in month  
\[n+1\]
  is 2. The state in month  
\[n+1\]
  cannot be 3, so the entry must be zero. We can complete the second column.
Month  
\[n+1\]
\Month  
\[n\]
 
0 1 2 3
0 8/9 2/9    
1 1/9 6/9    
2 0 1/9    
3 0 0    
If there are initially 2 in stock, the output is one. If demand is 3 (with probability 1/9) then the state in month  
\[n +1\]
  is zero, and if demand is 2, (with probability 1/9) the state in month  
\[n+1\]
  is 1. If demand is 1 (with probability 6/9) the state in month  
\[n+1\]
  is 2. If demand is 0 (with probability 1/9) the state in month  
\[n+1\]
  is 3. We can complete the third column.
Month  
\[n+1\]
\Month  
\[n\]
 
0 1 2 3
0 8/9 2/9 1/9  
1 1/9 6/9 1/9  
2 0 1/9 6/9  
3 0 0 1/9  
If there are initially 3 in stock, the output is zero. If demand is 3 (with probability 1/9) then the state in month  
\[n +1\]
  is zero, and if demand is 2, (with probability 1/9) the state in month  
\[n+1\]
  is 1. If demand is 1 (with probability 6/9) the state in month  
\[n+1\]
  is 2. If demand is 0 (with probability 1/9) the state in month  
\[n+1\]
  is 3. We can complete the last column.
Month  
\[n+1\]
\Month  
\[n\]
 
0 1 2 3
0 8/9 2/9 1/9 1/9
1 1/9 6/9 1/9 1/9
2 0 1/9 6/9 6/9
3 0 0 1/9 1/9