Exercise

# Understanding random seeds

While random numbers are important for many analyses, they create a problem: the results you get can vary slightly. This can cause awkward conversations with your boss when your script for calculating the sales forecast gives different answers each time.

Setting the seed to R's random number generator helps avoid such problems by making the random number generation reproducible.

Instructions 1/4

1

2

3

4

## Question

Which statement about `x`

and `y`

is true?

```
set.seed(123)
x <- rnorm(5)
y <- rnorm(5)
```

### Possible answers

`x`

and `y`

have identical values.The first value of

`x`

is identical to the first value of `y`

but other values are different.The values of

`x`

are different to those of `y`

.