We present computer experiments of electrostatic solitary waves (ESW) observed by Geotail in the magnetotail. ESW correspond to broadband electrostatic noise, and they are excited through electron two-stream instabilities along a static magnetic field. We performed one-dimensional electrostatic particle simulations involving two electron beams and an ion beam traveling along the static magnetic field. We vary the density ratio of the electron beams and the thermal velocities of the electron and ion beams. The values of these parameters strongly affect diffusion processes of the electron beams, and accordingly, different types of electrostatic waves are generated. We studied four different cases: cold bistream instability, weak-beam instability, bump-on-tail instability, and warm bistream instability. For these electron beam instabilities, we performed two different runs with cold and hot ions, respectively. The cold bistream instability gives ESW for hot ions and ion acoustic waves for cold ions. The weak-beam instability gives Langmuir waves, while the bump-on-tail instability gives ESW. The amplitudes of the waves excited by the weak-beam and bump-on-tail instabilities are small and do not induce nonlinear decay to ion acoustic waves even in the presence of cold ions. The warm bistream instability gives electron hole modes regardless of the value of the ion temperature. The electron hole mode is a normal mode in the presence of a two-hump electron distribution, and it is regarded as narrowband electrostatic noise. It also leads to formation of ESW, if the phase velocity of the electron hole mode is much larger than the ion drift velocity. A necessary condition for ESW formation through the bump-on-tail instability is derived theoretically, and its significance to Geotail observations is discussed.