2 added 128 characters in body

# Pyth, 444435 34 bytes


?eA.DhQ2+eQ*G,-eQJ*E@hc1thQ2+eQJ*G,-eQKE+eQK
.N?eA.DN2+T*G+LT_B*Y@hc1tN2*G+LT_BY
.N?eA.DhQ2+eQ*G,-eQJ*E@hc1thQ2+eQJ*G,-eQKE+eQKDN2+T*G+LT_B*Y@cNtN2*G+LT_BY


Try it online!Try it online! (The code above defines a function. :.* is appended on the link to invoke the function.)

## The maths

This constructs the data symmetrically. If N is even, then the data are just the mean plus or minus the standard deviation. However, if N is odd, then we just opened a can of worms, since the mean has to be present for the data to be symmetric, and so the fluctuations have to be multiplied by a certain factor.

### If n is even

• Half of the data are μ+σ.
• Half of the data are μ-σ.

### If n is odd

• One datum is μ.
• Less than half of the data are μ+σ*sqrt(1+1n/(n-1)).
• Less than half of the data are μ-σ*sqrt(1+1n/(n-1)).

# Pyth, 44 bytes

?eA.DhQ2+eQ*G,-eQJ*E@hc1thQ2+eQJ*G,-eQKE+eQK


Try it online!

## The maths

This constructs the data symmetrically. If N is even, then the data are just the mean plus or minus the standard deviation. However, if N is odd, then we just opened a can of worms, since the mean has to be present for the data to be symmetric, and so the fluctuations have to be multiplied by a certain factor.

### If n is even

• Half of the data are μ+σ.
• Half of the data are μ-σ.

### If n is odd

• One datum is μ.
• Less than half of the data are μ+σ*sqrt(1+1/(n-1)).
• Less than half of the data are μ-σ*sqrt(1+1/(n-1)).

# Pyth, 4435 34 bytes


?eA.DhQ2+eQ*G,-eQJ*E@hc1thQ2+eQJ*G,-eQKE+eQK
.N?eA.DN2+T*G+LT_B*Y@hc1tN2*G+LT_BY
.N?eA.DN2+T*G+LT_B*Y@cNtN2*G+LT_BY


Try it online! (The code above defines a function. :.* is appended on the link to invoke the function.)

## The maths

This constructs the data symmetrically. If N is even, then the data are just the mean plus or minus the standard deviation. However, if N is odd, then we just opened a can of worms, since the mean has to be present for the data to be symmetric, and so the fluctuations have to be multiplied by a certain factor.

### If n is even

• Half of the data are μ+σ.
• Half of the data are μ-σ.

### If n is odd

• One datum is μ.
• Less than half of the data are μ+σ*sqrt(n/(n-1)).
• Less than half of the data are μ-σ*sqrt(n/(n-1)).
1

# Pyth, 44 bytes

?eA.DhQ2+eQ*G,-eQJ*E@hc1thQ2+eQJ*G,-eQKE+eQK


Try it online!

## The maths

This constructs the data symmetrically. If N is even, then the data are just the mean plus or minus the standard deviation. However, if N is odd, then we just opened a can of worms, since the mean has to be present for the data to be symmetric, and so the fluctuations have to be multiplied by a certain factor.

### If n is even

• Half of the data are μ+σ.
• Half of the data are μ-σ.

### If n is odd

• One datum is μ.
• Less than half of the data are μ+σ*sqrt(1+1/(n-1)).
• Less than half of the data are μ-σ*sqrt(1+1/(n-1)).