             T n2 = n  * n;
             T n3 = n2 * n;
 
-			T delta  = y.mean - x.mean;
+            T delta  = y.mean - x.mean;
             T delta2 = delta  * delta;
             T delta3 = delta2 * delta;
             T delta4 = delta3 * delta;
-			
-			//Basic number of samples (n), min, and max
+            
+            //Basic number of samples (n), min, and max
             result.n   = n;
             result.min = thrust::min(x.min, y.min);
             result.max = thrust::max(x.max, y.max);
 
             result.mean = x.mean + delta * y.n / n;
 
-			result.M2  = x.M2 + y.M2;
+            result.M2  = x.M2 + y.M2;
             result.M2 += delta2 * x.n * y.n / n;
 
-			result.M3  = x.M3 + y.M3;
+            result.M3  = x.M3 + y.M3;
             result.M3 += delta3 * x.n * y.n * (x.n - y.n) / n2; 
             result.M3 += (T) 3.0 * delta * (x.n * y.M2 - y.n * x.M2) / n;
-	
+    
             result.M4  = x.M4 + y.M4;
-			result.M4 += delta4 * x.n * y.n * (x.n * x.n - x.n * y.n + y.n * y.n) / n3;
-			result.M4 += (T) 6.0 * delta2 * (x.n * x.n * y.M2 + y.n * y.n * x.M2) / n2;
-			result.M4 += (T) 4.0 * delta * (x.n * y.M3 - y.n * x.M3) / n;
+            result.M4 += delta4 * x.n * y.n * (x.n * x.n - x.n * y.n + y.n * y.n) / n3;
+            result.M4 += (T) 6.0 * delta2 * (x.n * x.n * y.M2 + y.n * y.n * x.M2) / n2;
+            result.M4 += (T) 4.0 * delta * (x.n * y.M3 - y.n * x.M3) / n;
             
             return result;
         }

            result.min  = x;
            result.max  = x;
            result.mean = x;
			result.M2   = 0;
			result.M3   = 0;
			result.M4   = 0;

            return result;
        }

    // compute summary statistics
    summary_stats_data<T> result = thrust::transform_reduce(d_x.begin(), d_x.end(), unary_op, init, binary_op);

    std::cout <<"******Summary Statistics Example*****"<<std::endl;
    print_range("The data", d_x.begin(), d_x.end());

    std::cout <<"Count              : "<< result.n << std::endl;
    std::cout <<"Minimum            : "<< result.min <<std::endl;
    std::cout <<"Maximum            : "<< result.max <<std::endl;
    std::cout <<"Mean               : "<< result.mean << std::endl;
    std::cout <<"Variance           : "<< result.variance() << std::endl;
    std::cout <<"Standard Deviation : "<< std::sqrt(result.variance_n()) << std::endl;
    std::cout <<"Skewness           : "<< result.skewness() << std::endl;
    std::cout <<"Kurtosis           : "<< result.kurtosis() << std::endl;

    return 0;
}
