NORM.S.DIST function
PRO
The NORM.S.DIST function in Jspreadsheet Formulas Pro returns the standard normal distribution, the normal distribution with mean 0 and standard deviation 1, for a given z-score. It is used to convert z-scores into probabilities in hypothesis tests and confidence intervals. With cumulative TRUE it returns the probability that a standard normal variable is less than or equal to z; with FALSE it returns the density at z. The compatibility function NORMSDIST returns only the cumulative form.
Documentation
Returns the standard normal distribution for a z-score.
Category
Statistical
Syntax
NORM.S.DIST(z, cumulative)
| Parameter | Description |
|---|---|
z |
The z-score at which to evaluate the distribution. |
cumulative |
TRUE returns the cumulative distribution function. FALSE returns the probability density function. |
Behavior
The NORM.S.DIST function is equivalent to NORM.DIST(z, 0, 1, cumulative).
- Both arguments are required. Calling the function with only
zreturns#N/A, socumulativecannot be omitted as in Excel. UseNORMSDIST(z)for the one-argument cumulative form. - The cumulative probability is 0.5 at
zequal to 0 and approaches 0 and 1 for large negative and positive z-scores. - The density at 0 is 0.398942, the peak of the standard normal curve.
- Text arguments return
#VALUE!.
Common Errors
| Error | Description |
|---|---|
| #VALUE! | Returned when an argument is text that cannot be interpreted as a number. |
Best practices
- Always pass the
cumulativeargument, since the function does not accept the one-argument form.- When the input is a raw value rather than a z-score, compute
(x - mean) / sdin a helper cell first so the formula stays readable.- Check with
ISNUMBERthat thezcell holds a number, because text returns#VALUE!.
Usage
A few examples using the NORM.S.DIST function.
NORM.S.DIST(-1.96, TRUE)
// Returns 0.024998
NORM.S.DIST(2, TRUE)
// Returns 0.97725
NORM.S.DIST(0, FALSE)
// Returns 0.398942, the density at zero
NORM.S.DIST(1.96)
// Returns #N/A because cumulative is required
Interactive Spreadsheet Demo
<html>
<script src="https://jsuites.net/v6/jsuites.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jspreadsheet@13/dist/index.min.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v6/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jspreadsheet@13/dist/jspreadsheet.min.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// You can use the following license for quick testing on localhost, StackBlitz, or CodeSandbox.
// The license is valid for one day, after which the spreadsheet will become read-only.
// For a longer trial period, you can create a free account and generate a demo license with an extended expiration date.
jspreadsheet.setLicense('NGNhNmRlZTEwZGUwZTI1ZTQ2MWVmMGYxNWI1N2QxMDVkNGYxYWY1ZDYyZDBiYzE1MjViM2ZjOTRmZTMyNDY4Y2E5ZTcwNjczYjJjY2Q4NWUwZGQ0OTRmNGQ1NmExODJhZDEwNmE3NDQ0OGU2OGU0MWZjOWI5MDYyNDIyNWU4OGQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpreE1ESTRORE15TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0luWXhNaUlzSW5ZeE15SXNJbU5vWVhKMGN5SXNJbVp2Y20xeklpd2labTl5YlhWc1lTSXNJbkJoY25ObGNpSXNJbkpsYm1SbGNpSXNJbU52YlcxbGJuUnpJaXdpYVcxd2IzSjBaWElpTENKaVlYSWlMQ0oyWVd4cFpHRjBhVzl1Y3lJc0luTmxZWEpqYUNJc0luQnlhVzUwSWl3aWMyaGxaWFJ6SWl3aVkyeHBaVzUwSWl3aWMyVnlkbVZ5SWl3aWMyaGhjR1Z6SWl3aVptOXliV0YwSWl3aWNHbDJiM1FpWFN3aVpHVnRieUk2ZEhKMVpYMD0=');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{
data: [
[
"z",
"cumulative",
"NORM.S.DIST"
],
[
-1.96,
true,
"=NORM.S.DIST(A2, B2)"
],
[
0,
true,
"=NORM.S.DIST(A3, B3)"
],
[
1.96,
true,
"=NORM.S.DIST(A4, B4)"
],
[
0,
false,
"=NORM.S.DIST(A5, B5)"
]
]
}]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('NGNhNmRlZTEwZGUwZTI1ZTQ2MWVmMGYxNWI1N2QxMDVkNGYxYWY1ZDYyZDBiYzE1MjViM2ZjOTRmZTMyNDY4Y2E5ZTcwNjczYjJjY2Q4NWUwZGQ0OTRmNGQ1NmExODJhZDEwNmE3NDQ0OGU2OGU0MWZjOWI5MDYyNDIyNWU4OGQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpreE1ESTRORE15TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0luWXhNaUlzSW5ZeE15SXNJbU5vWVhKMGN5SXNJbVp2Y20xeklpd2labTl5YlhWc1lTSXNJbkJoY25ObGNpSXNJbkpsYm1SbGNpSXNJbU52YlcxbGJuUnpJaXdpYVcxd2IzSjBaWElpTENKaVlYSWlMQ0oyWVd4cFpHRjBhVzl1Y3lJc0luTmxZWEpqYUNJc0luQnlhVzUwSWl3aWMyaGxaWFJ6SWl3aVkyeHBaVzUwSWl3aWMyVnlkbVZ5SWl3aWMyaGhjR1Z6SWl3aVptOXliV0YwSWl3aWNHbDJiM1FpWFN3aVpHVnRieUk2ZEhKMVpYMD0=');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
// Spreadsheet array of worksheets
const spreadsheet = useRef();
// Worksheet data
const data = [
[
"z",
"cumulative",
"NORM.S.DIST"
],
[
-1.96,
true,
"=NORM.S.DIST(A2, B2)"
],
[
0,
true,
"=NORM.S.DIST(A3, B3)"
],
[
1.96,
true,
"=NORM.S.DIST(A4, B4)"
],
[
0,
false,
"=NORM.S.DIST(A5, B5)"
]
];
// Render component
return (
<Spreadsheet ref={spreadsheet}>
<Worksheet data={data} />
</Spreadsheet>
);
}
<template>
<Spreadsheet ref="spreadsheet">
<Worksheet :data="data" />
</Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('NGNhNmRlZTEwZGUwZTI1ZTQ2MWVmMGYxNWI1N2QxMDVkNGYxYWY1ZDYyZDBiYzE1MjViM2ZjOTRmZTMyNDY4Y2E5ZTcwNjczYjJjY2Q4NWUwZGQ0OTRmNGQ1NmExODJhZDEwNmE3NDQ0OGU2OGU0MWZjOWI5MDYyNDIyNWU4OGQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpreE1ESTRORE15TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0luWXhNaUlzSW5ZeE15SXNJbU5vWVhKMGN5SXNJbVp2Y20xeklpd2labTl5YlhWc1lTSXNJbkJoY25ObGNpSXNJbkpsYm1SbGNpSXNJbU52YlcxbGJuUnpJaXdpYVcxd2IzSjBaWElpTENKaVlYSWlMQ0oyWVd4cFpHRjBhVzl1Y3lJc0luTmxZWEpqYUNJc0luQnlhVzUwSWl3aWMyaGxaWFJ6SWl3aVkyeHBaVzUwSWl3aWMyVnlkbVZ5SWl3aWMyaGhjR1Z6SWl3aVptOXliV0YwSWl3aWNHbDJiM1FpWFN3aVpHVnRieUk2ZEhKMVpYMD0=');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
components: {
Spreadsheet,
Worksheet,
},
data() {
// Worksheet data
const data = [
[
"z",
"cumulative",
"NORM.S.DIST"
],
[
-1.96,
true,
"=NORM.S.DIST(A2, B2)"
],
[
0,
true,
"=NORM.S.DIST(A3, B3)"
],
[
1.96,
true,
"=NORM.S.DIST(A4, B4)"
],
[
0,
false,
"=NORM.S.DIST(A5, B5)"
]
]
return {
data
};
}
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import formula from "@jspreadsheet/formula-pro";
// You can use the following license for quick testing on localhost, StackBlitz, or CodeSandbox.
// The license is valid for one day, after which the spreadsheet will become read-only.
// For a longer trial period, you can create a free account and generate a demo license with an extended expiration date.
jspreadsheet.setLicense('NGNhNmRlZTEwZGUwZTI1ZTQ2MWVmMGYxNWI1N2QxMDVkNGYxYWY1ZDYyZDBiYzE1MjViM2ZjOTRmZTMyNDY4Y2E5ZTcwNjczYjJjY2Q4NWUwZGQ0OTRmNGQ1NmExODJhZDEwNmE3NDQ0OGU2OGU0MWZjOWI5MDYyNDIyNWU4OGQsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpreE1ESTRORE15TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0luWXhNaUlzSW5ZeE15SXNJbU5vWVhKMGN5SXNJbVp2Y20xeklpd2labTl5YlhWc1lTSXNJbkJoY25ObGNpSXNJbkpsYm1SbGNpSXNJbU52YlcxbGJuUnpJaXdpYVcxd2IzSjBaWElpTENKaVlYSWlMQ0oyWVd4cFpHRjBhVzl1Y3lJc0luTmxZWEpqYUNJc0luQnlhVzUwSWl3aWMyaGxaWFJ6SWl3aVkyeHBaVzUwSWl3aWMyVnlkbVZ5SWl3aWMyaGhjR1Z6SWl3aVptOXliV0YwSWl3aWNHbDJiM1FpWFN3aVpHVnRieUk2ZEhKMVpYMD0=');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
standalone: true,
selector: "app-root",
template: `<div #spreadsheet></div>`
})
export class AppComponent {
@ViewChild("spreadsheet") spreadsheet: ElementRef;
// Worksheets
worksheets: jspreadsheet.worksheetInstance[];
// Create a new data grid
ngAfterViewInit() {
// Create spreadsheet
this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
worksheets: [{
data: [
[
"z",
"cumulative",
"NORM.S.DIST"
],
[
-1.96,
true,
"=NORM.S.DIST(A2, B2)"
],
[
0,
true,
"=NORM.S.DIST(A3, B3)"
],
[
1.96,
true,
"=NORM.S.DIST(A4, B4)"
],
[
0,
false,
"=NORM.S.DIST(A5, B5)"
]
]
}]
});
}
}