             .reduce(0, +)
     }
     
-    /// The dispersion
-    /// Dv = (Σv² / N) - (Σv / N)²
+    /**
+     The dispersion
+     Dv = (Σv² / N) - (Σv / N)²
+     */
     private func dispersion(v: String) -> Double {
         let sumSquared = [
             "x": { self.sumSquared(vector: self.xVector) },
             "y": { self.sumSquared(vector: self.yVector) }
         ]
+        
         let sum = [
             "x": { self.sum(vector: self.xVector) },
             "y": { self.sum(vector: self.yVector) }

//
// PredictionBuilder - A library for machine learning that builds predictions using a linear regression.
//
// Copyright (c) 2016-2017 Denis Simon <denis.v.simon@gmail.com>
//
// Licensed under MIT (https://github.com/denissimon/prediction-builder-swift/blob/master/LICENSE)
//

    }
    
    public struct Result {
        public let lnModel: String
        public let cor: Double
        public let x: Double
        public let y: Double
    }
    
    /**
     Builds a prediction of the expected value of y with the given x, based on linear regression model.
     */
    open func build() throws -> Result {
        // Check the number of observations
        guard count >= 3 else {
            throw ArgumentError.general(msg: "The dataset should contain a minimum of 3 observations.")
        }
        
        // Check the number of x and y
        guard count == xVector.count else {
            throw ArgumentError.general(msg: "Mismatch in the number of x and y in the dataset.")
        }
        
        let b = round_(number: bSlope())
