We describe an algebra for composing automata in which the actions have probabilities. We illustrate by showing how to calculate the probability of reaching deadlock in k steps in a model of the classical Dining Philosopher problem, and show, using the Perron-Frobenius Theorem, that this probability tends to 1 as k tends to infinity.