# Likelihood Ratio Test

#### Jamesd2

##### New Member
Hello,

I am attempting to develop a procedure to reduce the total number of trials while still being assured that the a distribution's parameters are accurate.

For example... We have a machine that is producing cogs with mean diameter 12 and standard deviation 1. Ho is that mean and variation = 12, 1 and H1 is that mean and variation do not equal 12,1.

I am pretty sure the answer to this question is about 5 trials will give you an a = .05.

I would like to translate this into a form where both mean and variation are unknown (or any distributions parameters) and as you take measurements you can make a statement to how well you believe to know these parameters.

To do this I think I can use LRT because...
1) Lack of dependence on large data sets (unlike Chi-Squared testing...)
2) Ability to compare likelihood of different distributions

I would appreciate some help or links to good examples (I have searched a lot) on how to find the C value of the test so that I can set a = .05 and determine the number of trials needed.

I guess basically to say that 95% of the time i take n number of measurements I will have an accuracy of x within the actual value of the estimated parameter.

Also any advice as that I am headed in the right direction would be good

Also why is c bounded between 0 and 1 when LRT is bounded between 0 and infinity?

Thanks

Last edited:

##### Ninja say what!?!
Hi there,

I am a little confused by what you are attempting. My understanding is that the LRT is used to compare the fit of two models, one of which is nested within the other.

Would you mind expanding on your understanding of the LRT and how it is conducted?

#### Jamesd2

##### New Member
Sure,

So as far as I understand the LRT utilizes the likelihood function to tell how "likely" it is that specific parameter matches a set of data.

So we can use this to do hypothesis testing where l = L(Theta_o | X)/L(Theta | X) is less than or equal to C to test if we reject a sample to come from a certain distribution (ex. the points 10, 11,9.4,5.5 are ~n(10,1) do we reject? at what level?)

or we could use completely different distributions and determine if that distribution fits the data better (this could get more complicated because the MLE of that distribution would probably need to be found to be significant in ruling it out.)

For this case we can use the same points but different likelihood function...one is the likelihood function for normal the other for Poisson for example... and be able to get a level of accuracy.

Again, in the end I want to be able to assume that whatever it is that I am testing is Normal, exp, whatever with certain parameters, then run a test N number of times and say that 95% of the time if the parameters and distributions are true I will agree with this up to X(defined) amount of accuracy.

Let me know if I am misunderstanding anything.

Thanks,

-James

P.S. Is there any better way to write formulas on the forum?

#### Dason

If you know LaTeX (or even if you don't) I give a brief introduction to using the math tags on the forum here.

##### Ninja say what!?!
I'm still confused, but I think I understand your problem a little better now.

By "c" are you referring to the p-value? If so, that would explain why c is bounded between 0 and 1 and the LRT is bounded between 0 and infinity.

I think that in referring to the LRT here, you're comparing the model to the Global Null Hypothesis that all the beta's = 0. Is that correct? If so, then all you would do when setting up a model is compare the LR value to the chi-square distribution. That would give you a p-value that tells you how much better your model is than not modelling at all.

As for how many times to run a test and creating a 95% CI, you firstly never truly know what the true parameter value is. So you can't really ever be completely sure of the value you have. Secondly, the 95% CI can be created regardless of how many observations you have (Please look up the interpretation of a confidence interval). It is up to you how narrow you want the 95% CI to be, which is dependent upon the number of observations.

I hope that helps.

#### Jamesd2

##### New Member
Thanks to Dason and Link for responses,

so an LRT test is...

$$\lambda(x) = \frac{sup L(\theta_o | x)}{sup L(\theta | x)}$$ where Ho is rejected while $$\lambda(x) \le C.$$

One then needs to calculate a value of C to give a specific P value... which can be difficult to do for different distributions and tests.

Also I agree that the confidence interval is applicable to my situation and will probably be used... but I was hoping to have a procedure using LRT so that it would have a more general use.