The density structure around quasars from optical depth statistics