%mathpiper,def="ValueToZScore"

//Retract("ValueToZScore",*);

ValueToZScore(value,mean,standardDeviation) :=
[
    (value - mean)/standardDeviation;
];

%/mathpiper

    %output,preserve="false"
      Result: True
.   %/output





%mathpiper_docs,name="ValueToZScore",categories="User Functions;Statistics & Probability",access="experimental"
*CMD ValueToZScore --- calculates the z-score of a numerical value
*STD
*CALL
	ValueToZScore(numericalValue,mean,standardDeviation)

*PARMS

{numericalValue} -- a numerical value
{mean} -- the mean
{standardDeviation} -- the standard deviation

*DESC
This function calculates the z-score for a given numerical value.

*E.G.
In> N(ValueToZScore(4.74,5,.332))
Result: -0.7831325301

*SEE ZScoreToValue,ZScoreToProbability,ProbabilityToZScore,ConfidenceLevelToZScore
%/mathpiper_docs

    %output,preserve="false"
      
.   %/output


