It is fairly easy to decipher what kind of tube should be in the socket with the above indications and also by looking at socket wiring. Grid wiring may come from a previous coil or capacitor, and plate wire will go to a successive coil or capacitor, and any resistors connecting here will connect to B+. Pin 2 is often the plate, and pin 4 the cathode. If there is a grid wire on top, grid 3 is probably a screen grid. If there is no grid wire on top, then pin 3 is probably the control grid. This would also indicate whether the tube is a tetrode or triode.
If the socket doesn't appear to have cathode type circuitry wired to pin 4, and the plate appears to connect to the speaker's output transformer, this may be a #47, which has a directly heated cathode (pins 1 and 5). Pin 2 will be the plate, 3 the screen grid, and 4 the control grid.
...Then, once all of the above details have been figured out, it is only a matter of selecting a tube with appropriate voltage and gain ratings, as well as preferred physical characteristics. Also, there is a tube, I forgot the number, which can be substituted for the #27. I like it better because the 27 usually has a mesh type plate (at least with Majestic tubes), and is prone to picking up stray noise, where-as the substitute tube has a solid plate. It's a 5- something.
T.
T.