I want to reduce the level of sound in a speaker (i think 6Ω 30w rms). I wonder if it is that simple to put a potentiometer in one of the cables.
If this can do the trick, how do I calculate the resistance needed?
That's a way, but it's better suited for eadphones, as the resistance will consume a power comparable to the speaker, so you need a fairly high power resistor.
The alternative is to use a power transistor, and then you would need only a circuit to bias it, and that can be generated also with a voltage divider, with the potentiometer.
The problem is, as Russel said, that the loudness is logarithmic with the power delivered, so you would need an exponential output from the transistor. I think that for achieving that you can use a MOSFET, that gives you an exponential transconductance (that is, for a linear increase of the input voltage, the current scales exponentially) but that's theory.
We really need more information about what your trying to achieve and especially what amplifier your using.
While the math @Russel McMahon provided is correct it doesn't consider the nature of the amplifier your using. For instance grounding the speaker negative would short out the amplifier if it were a class D with an H-bridge output (very common today), it would also short out a 'bridged' class AB amp.
Also the type of signal is very important. If your using this to blast test tones into something then the RMS power numbers provided are something to look at. If your playing dynamic music, the average power levels will be drastically lower and your concern is more with short peaks of power usage.
Your amplifier may also run into impedance issues. One of the examples shows an impedance of 4.4 ohm. This is just an average. Depending on the speaker, the impedance at its resonance point may be much lower, maybe under 2 ohms. Not many amplifiers can handles that cleanly without distortion or complete shutdown.
There are also issues with signal quality from tossing a resistor (and especially a pot) in the signal path, not sure how much of a concern this is for you.
You can get pot's with what is usually called an 'audio taper' which really means log taper. 'Audio taper' generally tells you two things. One that the resistance changes logarithmically when rotated making audio output change more linearly with respect to rotation of the knob. Second that the pot was designed with audio in mind, that it can pass a signal at least reasonably cleanly.
There are several ways to build a pot, the best for audio are made with a conductive plastic while the worst are made with a carbon/graphite deposit. Generally audio taper pots will at least be decent for audio use while a pot not labeled as such could be anything from terrible to good.
Ultimately the right solution (or at least how its normally done) is an autoformer. Most commercial wall mount volume controls are made this way and run about $25 USD for 100W stereo models. If you want to make one yourself all you need is 1 autoformer per channel with multiple taps on the secondary at your desired level step-down points and a rotary switch.
When shopping for parts just beware of the 'audiophiles' crazies selling $500 autoformers.
You can use pure resistance to reduce sound level to a speaker.
Simply adding series resistance will work but the amplifier may not be happy to see increasing resistance.
A potentiometer to ground with the top fed by the input and the speaker fed from the "wiper" would work better by results in extra signal loss at full volume.
Assuming your values are correct (which seems somewhat unlikely) the following gives an example of what could be achieved. Assume speaker is a pure resistive load (it's not)(Close enough for this purpose). E&OE.
30 Watt RMS max, 6 ohm speaker, 16 ohm pot.
Pot at 100%. Pspeaker 30 W. Ppot = 6/16 x 30 =~11 Watt extra on top of 30W in speaker. Impedance seen by amplifer = 6//16 =~ 4.4 ohm
Pot at 75%. Amplifier sees 8 ohms. Amp power = 6/8 x 30 ~=22 Watts. Powr in speaker = 7.5 Watts.
Pot at 50%. Amplifier sees ~= 11.5 ohms Power amp = 6/11.5 x 30 =~ 15 Watt. Power speaker =~ 3 Watts
Pot worst case dissipation ~= 12 Watt. Amplifier extra power =~ same 12 Watts.
Outtput falls non linearly with pot rotation.
Workable but not nice.