Skip to main content
Module

x/simplestatistics/index.js>errorFunction

simple statistics for node & browser javascript
Go to Latest
function errorFunction
import { errorFunction } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";

Gaussian error function

The errorFunction(x/(sd * Math.sqrt(2))) is the probability that a value in a normal distribution with standard deviation sd is within x of the mean.

This function returns a numerical approximation to the exact value. It uses Horner's method to evaluate the polynomial of τ (tau).

Examples

errorFunction(1).toFixed(2); // => '0.84'

Parameters

x

input