summaryrefslogtreecommitdiff
path: root/291/CH7/EX7.8b/eg7_8b.sce
blob: 3bd50dc71e7b0c4f652345de29a2604faff5211b (plain)
1
2
3
4
5
6
7
8
function result= meanestimator(sigma0 , u, sigma, n, X)
    meanX= mean(X);
    result = (n*meanX/sigma0)/((n/sigma0)+(1/sigma)) + (u/sigma)/((n/sigma0)+(1/sigma));
endfunction

function result= varestimator(sigma0 , sigma, n)
    result = (sigma0*sigma)/((n*sigma)+sigma0);
endfunction