N_Dist
Advanced Analysis Library Only
AnalysisLibErrType N_Dist (double x, double *probabilityOfX);
Purpose
Calculates the one-sided probability:
p = prob(X ≤ x)
where X is a random variable from a standard normal distribution.
For computing the two-sided probability
p2 = prob(–x ≤ X ≤ x)
you can use the following formula:
p2 = 1.0 – 2 × prob(X ≤ –x)
Example Code
double x, p;
x = -123.456;
N_Dist (x, &p);
Parameters
Input | ||
Name | Type | Description |
x | double | The point from which the probability is computed. Range: –∞ < x < ∞ |
Output | ||
Name | Type | Description |
probabilityOfX | double | Calculated probability (0 < p < 1). |
Return Value
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later