Suppose a sample space has things a,b and c. Twice, draw from the sample space and replace. The possible sequences formed are {aa, ab, ac,ba,bb, bc,ca,cb,cc} Now suppose there are Y different things. There are Y ways the first draw can occur. For each of the Y ways the first draw can occur, there are Y ways the second draw can occur, resulting in Y times Y, or Y2 sequences. For each of the Y2 sequences formed from 2 draws, there are Y ways the 3rd draw can occur forming Y3 sequences. Generalizing, there are Yx sequences formed by drawing X times from Y different things with replacement. How many sequences of 3 things can be formed from 9 thins with replacement and order is important