rStats.js v1.3.0
    Preparing search index...

    Function shapiroTest

    • Shapiro-Wilk test of normality. Equivalent to R's shapiro.test(). NaN values are dropped; the sample size must be between 3 and 5000.

      Parameters

      Returns Omit<HTest, "alternative">

      const x = [2.1, 3.4, 1.9, 5.6, 4.4, 3.3, 2.8, 4.1, 3.9, 6.2];
      const r = shapiroTest(x);
      r.statistic; // 0.9586525103840963
      r.pValue; // 0.7704047318146288