diff --git a/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx b/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
index a2dac49562e4d9bf2b4f3927d93908b1cb6012fa..f48ec15b740efb567106090e87eb7b0ccb56b439 100644
--- a/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
+++ b/Modules/Applications/AppClassification/app/otbComputeImagesStatistics.cxx
@@ -140,7 +140,7 @@ private:
         variance[itBand] += (size[0] * size[1] - 1) * (statsEstimator->GetCovariance())(itBand, itBand);
         }
       //Increment nbSamples
-      nbSamples += size[0] * size[1] * nbBands;
+      nbSamples += size[0] * size[1];
       }
 
     //Divide by the number of input images to get the mean over all layers