When I do a ks.test in R for a sample to check from which distribution it is, it gives me a $p$ value less than 0.01 for various distributions and I don't know why. Maybe because of parameters or smth? Also, I have a dataset in r with two columns (samples) and the ks.test even gives an output for the whole dataset ( when I write ks.test(x = data,...). Anyway I don't know how to correct the issue so that the test really shows from which distribution the data is drawn. Almost for every distribution the p value is given as much less than 0.01.
2026-03-28 03:56:14.1774670174
Check for distribution of the sample with unknown parameters using ks.test in R.
242 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in STATISTICS
- Given is $2$ dimensional random variable $(X,Y)$ with table. Determine the correlation between $X$ and $Y$
- Statistics based on empirical distribution
- Given $U,V \sim R(0,1)$. Determine covariance between $X = UV$ and $V$
- Fisher information of sufficient statistic
- Solving Equation with Euler's Number
- derive the expectation of exponential function $e^{-\left\Vert \mathbf{x} - V\mathbf{x}+\mathbf{a}\right\Vert^2}$ or its upper bound
- Determine the marginal distributions of $(T_1, T_2)$
- KL divergence between two multivariate Bernoulli distribution
- Given random variables $(T_1,T_2)$. Show that $T_1$ and $T_2$ are independent and exponentially distributed if..
- Probability of tossing marbles,covariance
Related Questions in PROBABILITY-DISTRIBUTIONS
- Given is $2$ dimensional random variable $(X,Y)$ with table. Determine the correlation between $X$ and $Y$
- Statistics based on empirical distribution
- Given $U,V \sim R(0,1)$. Determine covariance between $X = UV$ and $V$
- Comparing Exponentials of different rates
- Linear transform of jointly distributed exponential random variables, how to identify domain?
- Closed form of integration
- Given $X$ Poisson, and $f_{Y}(y\mid X = x)$, find $\mathbb{E}[X\mid Y]$
- weak limit similiar to central limit theorem
- Probability question: two doors, select the correct door to win money, find expected earning
- Calculating $\text{Pr}(X_1<X_2)$
Related Questions in HYPOTHESIS-TESTING
- Neyman-Pearson precision problem
- Rejecting null based on the likelihood ratio test
- What statistical test should I use?
- Should We Use a Paired or Two-Sample Test?
- How to prove inadmissibility of a decision rule?
- Statistics Hypothesis Testing of Continuous Variables
- Experimentally proving bias
- Hypothesis testing: mean comparison
- uniformly most powerful test: binomial distribution
- Can significance check be applied and which one?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
I have no idea what data you are using or how you are choosing their supposed population distributions. Maybe a demonstration where the Kolmogorov-Smirnov test in R does work will be helpful.
Suppose use R to take a sample of size $n = 100$ from a population known to be $\mathsf{Norm}(mu = 100, \sigma = 15).$ Then I use the K-S test to see if the data match their parent distribution. Then the K-S test does not reject the null hypothesis that the data are distributed as $\mathsf{Norm}(mu = 100, \sigma = 15).$
Now suppose I generate a random sample of size 200 from $\mathsf{Exp}(\lambda = 0.01),$ which has mean 100 and standard deviation 100. Then I do a K-S test to see if the data are consistent with a normal distribution with $\mu = \sigma = 100.$
The null hypothesis that the data are from $\mathsf{Norm}(100,100)$ is rejected with a tiny P-value. The mean and variance are correct, but the K-S test detects that the shape of the distribution is wrong. However, a K-S test that the data are from $\mathsf{Exp}(0.01)$ is not rejected:
The K-S test works by comparing the empirical CDF (ECDF) of the sample with the CDF of the hypothetical distribution. An ECDF of continuous data is a step-function that increases by $1/n$ at each (sorted) observation.
In the plot below, the heavy dots show the ECDF of the sample. The heavy blue curve is the CDF of $\mathsf{Exp}(0.01),$ which matches the ECDF pretty well. But the CDF of $\mathsf{Norm}(100,100)$ (broken red curve) is a poor match.
The $D$-statistic of the K-S test is the largest vertical distance between the sample ECDF and the hypothetical CDF.