# randomGaussian()

## Example

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FD9fUjkgbYPKDHnz089Ze%2F150%2C15.gif?alt=media&#x26;token=cedceb35-4e90-4c49-8f16-fd0b97d94d8f" alt=""><figcaption></figcaption></figure>

```python
    circle(randomGaussian(150, 15), randomGaussian(150, 15), 25)
```

### Syntax

```
randomGaussian([mean], [std])
```

| Input | Description                                |
| ----- | ------------------------------------------ |
| mean  | the mean of the distribution               |
| std   | the standard deviation of the distribution |

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FgU3ScC6ZJuEEyVGC6xEx%2F150%2C50.gif?alt=media&#x26;token=a804e54c-abac-4310-973d-2d11e45020c2" alt=""><figcaption></figcaption></figure>

```python
    circle(randomGaussian(150, 50), randomGaussian(150, 50), 25)a
```

### Description

This function picks a **random value from a gaussian distribution** of a specified mean `µ` and standard deviation `σ`. \
The gaussian distribution prefers those points around the mean more that others. The farther the point is from the mean the less likely it is to be picked. But how far? the standard deviation parameter specifies that.

<figure><img src="https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2F7fLJutJwwJYcTTQQR3bY%2Fgaussian.gif?alt=media&#x26;token=06384dcc-0453-4e9e-be65-16cebff2862f" alt=""><figcaption></figcaption></figure>

$$
f(x) =\frac 1 {\sigma \sqrt {2\pi}}\  e^{-\frac 1 2 (\frac {x-\mu} {\sigma})^2}
$$

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
