Experimental study of the thermodynamic uncertainty relation