0
$\begingroup$

I have an array of 40 numbers drawn from a normal distribution with an unknown mean and standard deviation.

data = [8.10, -7.60, 1.80, 7.30, 2.60, 2.30, -5.60, 3.30, 1.60, -7.80, 3.20, 

2.20, 2.40, 4.50, 9.50, 1.50, 2.20, 1.10, 1.20, -9.50, -5.40, 3.40, 1.70, 1.30, 1.90, 2.20, 2.50, -9.70, 1.70, 3.00, -1.10, 4.10, 1.80, 1.90, 1.80, 2.30, -4.40, -1.00, 1.00, 8.60]

I can easily find the sample mean and sample standard deviation from this data set. How would I go about find finding the probability of the mean and standard deviation of the distribution the data are drawn from?

$\endgroup$
4
  • 1
    $\begingroup$ You could assume a prior distribution for $\mu$ and $\sigma$ and update it to a posterior distribution based on your observations. $\endgroup$
    – Henry
    May 3 at 0:33
  • 1
    $\begingroup$ Incidentally, your observations do not look as if they were drawn from a normal distribution, as they are all integers and are the values from $0$ to $40$ appearing once each, apart from $15$ which does not appear $\endgroup$
    – Henry
    May 3 at 0:34
  • $\begingroup$ My mistake, I grabbed the wrong numbers. I made the correction. $\endgroup$
    – billyyank
    May 3 at 1:50
  • $\begingroup$ Answering this question should be useless to you, because even the new data aren't remotely close to Normally distributed. $\endgroup$
    – whuber
    May 3 at 12:25
0
$\begingroup$

I agree with @Henry that your data don't appear to be normal. Integer values could result from rounding data from a continuous distribution. They might have come from a discrete uniform distribution on integers $0$ through $40.$ but results seem too regular to be a random sample.

sort(x)
 [1]  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 16 17 18 19 20
[21] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

This time, the missing number if $5.$

summary(x); length(x); sd(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    9.75   20.50   20.12   30.25   40.00 
[1] 40         # sample size
[1] 12.10465   # sample standard deviation.

Points in a normal probability plot (QQ-plot) is distinctly nonlinear.

qqnorm(x); qqline(x, col="green2", lwd=2)

enter image description here

In R, you can select a sample of size 40 from integers 0, 1, \dots, 40 (41 values) and get 40 of the 41 observations, as follows. One possible number will be omitted (in your case it was $15.$

set.seed(2021)
x = sample(0:40, 40)
sort(x)
 [1]  0  1  2  3  4  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
[21] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

This time, the missing number if $5.$

It is not clear what you mean by "...finding the probability of the mean and standard deviation of the distribution the data are drawn from."

If you intended to ask about confidence intervals (CIs) for the population mean $\mu$ and population standard deviation $\sigma,$ then I would be hesitant to use methods based on a normal population.

If the sample is truly not random, then there is not much point trying to find confidence intervals--or doing any other kind of inference for $\mu$ and $\sigma.$

If you really do have a discrete uniform distribution on $0$ through $40,$ in which each of the $41$ values has probability $1/41,$ then the population mean $\mu=20$ and SD $\sigma = 11.83216$ can be found as follows:

k = 0:40
mu = sum(k*1/41); mu
[1] 20
sg = sqrt(sum((k-mu)^2)*(1/41)); sg
[1] 11.83216

If it is now somehow clear that you didn't ask the question your intended, please revise your Question (don't leave easily overlooked comments), and maybe someone can be more helpful.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.