standard_deviation Interface

public interface standard_deviation

Module Procedures

private pure function standard_deviation_array(x) result(rst)

Computes the sample standard deviation of the values in an array.

The value computed is the sample standard deviation.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

The array of values to analyze.

Return Value real(kind=real64)

Sample standard deviation; invalid/undersized data give NaN. It can remain finite even when the variance would overflow.

private pure function standard_deviation_column(x) result(rst)

Computes sample standard deviation using the array implementation on a copy.

Arguments

Type IntentOptional Attributes Name
class(data_column), intent(in) :: x

The input column, unchanged; unallocated storage is treated as empty.

Return Value real(kind=real64)

Sample standard deviation; fewer than two values or nonfinite data give NaN. Unrepresentable results give positive infinity.