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

    Function zTest

    • z test for the mean of one sample, or the difference of the means of two, with known standard deviations. Equivalent to BSDA::z.test() in R. The open end of a one-sided interval is ±Infinity here (NA in BSDA). NaN values are dropped.

      Parameters

      Returns HTest

      zTest([5.1, 4.9, 5.6, 5.8, 6.0], { mu: 5, sigmaX: 0.5 }).pValue; // 0.031823127386490346