Correlations of optical and infrared excesses in T Tauri stars