# Calculating a log liklihood ratio test based on covariance and mean.

2 ビュー (過去 30 日間)
Niveditha Kumar 2019 年 10 月 1 日

I have to test the hypothesis; given
h_0 : Customer belong to bio customers with mean mu_0 and Covarianve sigma_0
h_1 : Customers belong to non bio customers wit mean mu_1 and Covariance sigma_2
I am trying to set up a liklehood ratio test. Please find my code below. I would like to set up a liklihood ratio test and adust threshold to see how it varies. Help on how to procceed with code would be useful.
This is the test that I am trying to set up is as below after simplifying: This is the pearson log liklihood test clear; clc;
%%
mu = [80 130 200];
L = randn(3);
sigma = L'*L
rng('default') % For reproducibility
R = mvnrnd(mu,sigma,200);
mu1 = [6 110 300];
sigma1 = randn(3);
sigma1 = L'*L
rng('default') % For reproducibility

#### 0 件のコメント

サインイン to comment.

### 回答 (1 件)

Shashank Gupta 2019 年 10 月 4 日
Hi Niveditha,
There is a function in MATLAB “lratiotest” which will calculate the likelihood ratio test, given the model specification. This function can be used directly in your case since all the required information is provided to you in the hypothesis which is declared.
I hope it helps.
Thanks,

#### 0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。