Question
Reverse work out the mean using random number seed
In R
language version 4.4.1
(the version should not matter, just for the sake of discussion), we write the code :
set.seed(1234)
x <- 5
y <- rnorm(1, mean = x, sd = 0.1)
We will be able to print the number y
. Suppose that there is a second person, he knows the number y
, that we are using seed 1234
and that he knows the number is generated using this code. The only thing he does not know is the number x
. Can he work out that x=5
?