testing hypothesis that p=alpha at 5% & 1%

3 visualizaciones (últimos 30 días)
Jardine Shi
Jardine Shi el 19 de Nov. de 2020
Respondida: Rohit Pappu el 23 de Nov. de 2020
%does this mean that I just need to change the value of p ? to either 5% or 1% ?
p=0.05
n=9
% create a 1x(n+1) vector y containing the probabilities with which a
% Bin(n,p) random variable is equal to the values 0,1,2,...,n
x=0:n;
y=binopdf(x,n,p);
% create a 1x(n+1) vector z containing the values taken by the standardized
% sample mean when the mean is equal to the values 0,1/n,2/n,...,1
z = (x/n-p)/sqrt(p*(1-p)/n);
%plotting the PMF of sample mean
bar(z,y);
xlabel('Observation')
ylabel('Probability')

Respuestas (1)

Rohit Pappu
Rohit Pappu el 23 de Nov. de 2020
To test the hypothesis at various confidence levels, Lilliefors test can be used .
Example
[h,p] = lillietest(x, 'Alpha', 0.05) %% Alpha is a name-value pair argument which takes a value between 0 and 1
Additional documentation about Lilliefors test can be found here

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by