If you're going to invent some fake news, you'll want to fabricate some data to back it up. You must already have some preconceived conclusions and you want some statistics to strengthen the argument of your faulty logic. This challenge should help you!
Given three input numbers:
- N - number of data points
- μ - mean of data points
σ - standard deviation of data points, where μ and σ are given by:
Output an unordered list of numbers, 𝑥i, which would generate the given N, μ, and σ.
I'm not going to be too picky about I/O formats, but I do expect some sort of decimals for μ, σ, and the output data points. As a minimum, at least 3 significant figures and magnitude of at least 1,000,000 should be supported. IEEE floats are just fine.
- N will always be an integer, where 1 ≤ N ≤ 1,000
- μ can be any real number
- σ will always be ≥ 0
- data points can be any real number
- if N is 1, then σ will always be 0.
Note that most inputs will have many possible outputs. You only need to give one valid output. The output may be deterministic or non-deterministic.
Input (N, μ, σ) -> Possible Output [list] 2, 0.5, 1.5 -> [1, 2] 5, 3, 1.414 -> [1, 2, 3, 4, 5] 3, 5, 2.160 -> [2, 6, 7] 3, 5, 2.160 -> [8, 4, 3] 1, 0, 0 ->