combinedMean is variable to store the combined mean of both array .
$ combinedMean = ( float ) ( $ n * $ mean1 + $ m * $ mean2 ) / ( $ n + $ m ) ; echo ( " Combined Mean : " round ( $ combinedMean , 2 ) ) ;