A numerical method for solving stochastic mechanics problems by representing the solution using a small number of random parameters is presented. In essence, the method is a Galerkin approximation in the sample space. The associated projection of the solution into the space of simple random variables reduces the stochastic problem to a set of deterministic problems. Alternatively, this method can be viewed as a modified-for computational efficiency-stratified sampling method. Several examples are considered involving the use of the Loeve-Karhunen expansion for a stochastic field approximation. The examples deal with the determination of the natural frequencies and of the seismic response of a beam with random rigidity.