Question

In: Statistics and Probability

We have a random sample of size n (which is large), and we wish to test...

We have a random sample of size n (which is large), and we wish to test - Ho: X~UNIF(0,1) vs Ha: X~exp(1). How would you conduct hypothesis testing? Describe procedure.

Solutions

Expert Solution

There can be several approaches for this kind of testing of distributions.

1. If the sample comes from uniform(0,1), then the value of the sample will never exceed 1. Hence, if you have a sample of sufficiently large size, and the range of the sample is between 0 and 1, then you can not say that the sample definitely comes from uniform, BUT if the sample range exceeds 1 then you can definitely say that the sample is not drawn from Uniform(0,1).

2. the above test is quite deterministic. Now if you have sample whose range is between 0 and 1, then you can not say that the sample comes from uniform(0,1). Now, in this case, you can use empirical histogram drawing to have a preliminary idea about the distributions.

Here, I am showing you two different histograms for two different samples coming from the uniform and exponential respectively.

3.

Till now we were talking about crude ways of preparing the test criterions. Now for the exact test of whether the sample comes from a uniform or exponential distribution, we will use the Kolmogorov-Smirnov test.

In statistics, the Kolmogorov–Smirnov test (K–S test or KS test) is a nonparametric test of the equality of continuous, one-dimensional probability distributions that can be used to compare a sample with a reference probability distribution (one-sample K–S test), or to compare two samples (two-sample K–S test). It is named after Andrey Kolmogorov and Nikolai Smirnov.

The Kolmogorov–Smirnov statistic quantifies a distance between the empirical distribution function of the sample and the cumulative distribution function of the reference distribution, or between the empirical distribution functions of two samples. The null distribution of this statistic is calculated under the null hypothesis that the sample is drawn from the reference distribution (in the one-sample case) or that the samples are drawn from the same distribution (in the two-sample case). In the one-sample case, the distribution considered under the null hypothesis may be continuous, purely discrete or mixed. In the two-sample case, the distribution considered under the null hypothesis is a continuous distribution but is otherwise unrestricted.

Now I shall take help from R to conduct the test. I shall append all the codes and output in the Appendix section.

This particular test is very helpful in determining whether a sample is coming from a particular distribution or not. If the p-value is less than 0.05 then we can conclude that with 95% confidence we can say that the sample is not from distribution mentioned. Otherwise, the sample comes from a specified distribution.

Hope this explanation has helped you.

Appendix:

hist(rexp(10000,1)) #10000 random samples from exponential(1)
hist(runif(10000,0,1)) #10000 random samples from uniform(0,1)

ks.test(rexp(10000,1),runif(10000,0,1))

Two-sample Kolmogorov-Smirnov test

data: rexp(10000, 1) and runif(10000, 0, 1)
D = 0.3641, p-value < 2.2e-16
alternative hypothesis: two-sided

Hope this answer has helped you. If you have some queries regarding this, do let me know in the comment section.

Hit like if the answer really helped you.

Thanks !!


Related Solutions

Suppose we have a random sample of size 50 from a N(μ,σ2) PDF. We wish to...
Suppose we have a random sample of size 50 from a N(μ,σ2) PDF. We wish to test H0: μ=10 versus H1: μ=10. The sample moments are x ̄ = 13.4508 and s2 = 65.8016. (a) Find the critical region C and test the null hypothesis at the 5% level. What is your decision? (b) What is the p-value for your decision? (c) What is a 95% confidence interval for μ?
We have a random sample of size 10 from a normal distribution. We wish to estimate...
We have a random sample of size 10 from a normal distribution. We wish to estimate the population mean. Damjan suggests taking the average of the sample minimum and sample maximum. Allan thinks this will be a poor estimator and says we should use the sample mean instead. Do a simulation in R to compare these two estimators in terms of their bias and variance. Include a side-by-side boxplot that compares their sampling distributions.
We have a random sample of size 10 from a normal distribution. We wish to estimate...
We have a random sample of size 10 from a normal distribution. We wish to estimate the population mean. joseph suggests taking the average of the sample minimum and sample maximum.steve thinks this will be a poor estimator and says we should use the sample mean instead. Do a simulation in R to compare these two estimators in terms of their bias and variance. Include a side-by-side boxplot that compares their sampling distribut showing R output also
A random sample of size n is to be used to test the null hypothesis that...
A random sample of size n is to be used to test the null hypothesis that the parameter θ of an exponential population equals θ0 against the alternative that is does not equal θ0. (a) Find an expression for the likelihood ratio statistic. (b) Use the result in part (a) to show that the critical region of the likelihood ratio can be written as ye¯ −y/θ ¯ 0 ≤ K? .
1. A random sample of size n = 10 is taken from a large population. Let...
1. A random sample of size n = 10 is taken from a large population. Let μ be the unknown population mean. A test is planned of H0: μ=12vs. HA: μ̸=12usingα=0.1. A QQ plot indicates it is reasonable to assume a normal population. From the sample, x̄ = 14.2 and s = 4.88. (I suggest doing this problem with a calculator and table as practice for exams. You may check your answers with R if you wish.) (a) Since the...
Which of the following is the best description of a simple random sample of size n...
Which of the following is the best description of a simple random sample of size n from a population of size N. A) Any method of sampling in which individuals are selected in a completely haphazard fashion. B) Any method of sampling in which every group of individuals of size n is equally likely to be selected. C) Any method of sampling in which every individual is equally likely to be selected. D) Any method of sampling in which each...
A random sample of size n = 100 is taken from a population of size N...
A random sample of size n = 100 is taken from a population of size N = 600 with a population proportion of p =0.46. Is it necessary to apply the finite population correction factor? Calculate the expected value and standard error of the sample proportion. What is the probability that the sample mean is less than .40?
A random sample of size n = 69 is taken from a population of size N...
A random sample of size n = 69 is taken from a population of size N = 971 with a population proportion p = 0.68. a-1. Is it necessary to apply the finite population correction factor? Yes or no? a-2. Calculate the expected value and the standard error of the sample proportion. (Round "expected value" to 2 decimal places and "standard error" to 4 decimal places.) Expected Value- Standard Error- b. What is the probability that the sample proportion is...
A random sample of size n = 71 is taken from a population of size N...
A random sample of size n = 71 is taken from a population of size N = 639 with a population proportion p = 0.73. a-1. Is it necessary to apply the finite population correction factor? a-2. Calculate the expected value and the standard error of the sample proportion. (Round "expected value" to 2 decimal places and "standard error" to 4 decimal places.) b. What is the probability that the sample proportion is less than 0.66? (Round “z” value to...
A random sample of size n = 152 is taken from a population of size N...
A random sample of size n = 152 is taken from a population of size N = 3,300 with mean μ = −71 and variance σ2 = 112. [You may find it useful to reference the z table.] a-1. Is it necessary to apply the finite population correction factor? Yes No a-2. Calculate the expected value and the standard error of the sample mean. (Negative values should be indicated by a minus sign. Round "standard error" to 2 decimal places.)...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT