1
$\begingroup$

I am fairly new to statistical inference. I have data with the following histogram. No of rows in dataset is 147

enter image description here

Can I perform hypothesis testing on this?

Also, I generated a sampling distribution of this, with size 200 and each sample size 8.enter image description here

The code was:

for(i in 1:200) {
  a=sample(data[[8]],8,replace=T)
  b=mean(a)
  samp[length(samp)+1]=b
}

What does the sampling distribution being normal signify? If I were to perform hypothesis testing on the original or sampling distribution, what would be the consequences of either? I read somewhere that hypothesis testing can be conducted on non-normal data as long as it has finite variance, what does this mean? How can I normalize the original data? I know I haven't given much details on my dataset but any broad methods to do it would do.

$\endgroup$
3
  • 4
    $\begingroup$ what is the hypothesis you want to test? $\endgroup$
    – ikonikon
    Commented Oct 23, 2015 at 18:14
  • 2
    $\begingroup$ Also, you are just observing the central limit theorem (or the consequences thereof). $\endgroup$
    – air
    Commented Oct 23, 2015 at 19:14
  • $\begingroup$ There seems to be a discrepancy in the question here: at one point they say they have 147 items in the dataset, but at another point they seem to be considering samples of size 8. (They may have confused sample size with number-of-bins used in the histogram.) $\endgroup$ Commented Jan 8, 2022 at 4:28

2 Answers 2

0
$\begingroup$

It depends on what hypothesis you want to test. More specifically, it usually depends on what kind of parameter on which you'd like to run the test.

For example, you can perform a z-test or t-test for a population mean, even if the population is non-normal, as long as you have a large sample size. (Weiss, Introductory Statistics, Procedure 9.1 and 9.3). You can do the same for a population proportion (Procedure 12.1).

On the other hand, you cannot do the same if you were performing a test on a population standard deviation. For example, Weiss writes regarding the chi-squared test (Procedure 11.1):

Unlike the z-tests and t-tests for one and two population means, the one-standard-deviation $\chi ^2$-test is not robust to moderate violations of the normality assumption. In fact, it is so nonrobust that many statisticians advise against its use unless there is considerable evidence that the variable under consideration is normally distributed or very nearly so.

Now, the OP's code shows that the parameter they had in mind was indeed the mean. If the sample size was 8 (as considered at one point), that is not considered to be a "large sample", so hypothesis tests in that case would not be considered valid. But if the sample size was 147 (considered at a different point), then that is indeed a large sample, and a z-test or t-test would be considered legitimate. This is of course an effect of the central limit theorem, that the sampling distribution of the sample mean (or proportion) fortunately always becomes a normal curve in the limit at infinite sample size. (The threshold for "large sample" is usually considered to be around 25 or 30.)

In cases of other parameters, then you'll have to commit to carefully reading the prerequisites to whatever hypothesis test procedure you're using, and make sure that you've met them. As noted, some testing procedures are robust to violations of the normal-population assumption, and others are not.

$\endgroup$
0
$\begingroup$

Here's another idea: Instead of sampling N=8 200 times (with replacement), you could sample all data points (N=147) let's say 1000 times. That approach is called a bootstrap and is a great method for analyzing data irrespective of distributional aassumptions.

From the resulting bootstrap distribution of 1000 mean values, you can e.g. construct a confidence interval using the percentiles of this distribution. The bootstrap method may therefore be used for statistical inference as well.

Btw. the bootstrap is not restricted to the mean. Other parameters can be estimated as well. Also, the standard bootstrap requires independent data.

$\endgroup$

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