---
name: "PGAStddev"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGAStddev"
---

# PGAStddev(3)

calculates the standard deviation of an array of elements

## NAME

PGAStddev - calculates the standard deviation of an array of elements

## INPUT PARAMETERS

- ctx

  \- context variable

- a

  \- array to take the standard deviation of

- n

  \- number of elements in array a

- mean

  \- the mean of the elements in array a

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
double  PGAStddev(ctx, a, n, mean)
PGAContext *ctx
double *a
int n
double mean
```

## LOCATION

utility.c

## EXAMPLE

```
Example:
PGAContext *ctx;
double a[100], mean, sigma;
:
mean  = PGAMean(ctx, a, 100);
sigma = PGAStddev(ctx, a, 100, mean);
```
