Mathematical Statistics and Matlab: Chapter 1 parameter estimation

Source: Internet
Author: User
Estimated

Point estimation: for a given population and sample, if an unknown parameter of the population is estimated using the value of a statistic, this estimation method is called point estimation, which is called the point estimator. For example, sample mean is used to estimate the overall mean, and sample variance is used to estimate the overall variance.

Common methods for finding the point estimator include Moment Estimation and maximum likelihood estimation, which are required by the postgraduate students.

There are many estimation methods for the same unknown parameter. How can I choose? This involves the evaluation criteria of the estimator. We often look at it from the following three different perspectives.

2.1.1Non-biased

Define 1.5 set the population to contain unknown parameters, which is a simple random sample from the population and an estimator. If there is always a value regardless of the value within the given range, it is called a non-biased estimator; if it is called a biased estimator.

Note that unbiased estimation means that, due to the randomness of the sample, the estimation value is sometimes too large and sometimes too small, so that the average value of multiple estimates can be close to the real unknown parameter value.

Whether unbiased estimation or biased estimation, you can use the "mean square error" MSE for evaluation:

(2-1)

For unbiased estimation, but it may be very large. If so, it is not a good estimator. On the contrary, for biased estimates, although, if the sum is still small, it is a good estimator.

For example, 2.1, set the population to a simple random sample from the population. to estimate the average value of the population (note the unknown), compare the estimator of the following three points:

,,

This example provides a random simulation method to evaluate the point estimator using MSE. Because the mean of the population is, We can first set a fixed value. For example, we can then extract a sample with a capacity of 20 from the known and fixed population of this parameter, calculate the estimated values by using the sample values based on the three methods respectively (note that no one should peek at the card) to see which method has a large error and which method has a small error. The comparison of one estimation generally does not indicate the problem, just as low-handed Shooting may also hit 10 rings, and Master shooting may also hit 9 rings. If you have shot 10 thousand times in a row and compare the total number of loops (or the average number of loops), many of them must be masters. Similarly, if the sample size is 20 times

It is better for small users.

N = 10000; M = 5; n = 20;

Mse1 = 0; mse2 = 0; mse3 = 0;

For k = 1: N

X = chi2rnd (M, 1, n );

M1 = 101 * x (1)-100 * X (2 );

M2 = median (X );

M3 = mean (X );

Mes1 = mse1 + (m1-m) ^ 2;

Mes2 = mse2 + (m2-m) ^ 2;

Mes3 = mse3 + (m3-m) ^ 2;

End

Mse1 = mes1/n

Mse2 = mes2/n

Mse3 = mes3/n

The above program is saved as ex21.m. In the command window, type ex21 and the calculation result is

Mse1 =

58.1581

Mse2 =

7.8351e-005

Mse3 =

9.4469e-006

It can be seen that the first one is a non-biased estimator, but the MSE is very large and the performance is very poor. Although the second is biased estimation, it is similar to the third and is also a good estimator. In addition, if you run ex21 repeatedly, the results are different each time, but the performance is almost the same.

In Example 2.2, we set it as a simple random sample from a population with a uniform distribution. We can easily obtain the moment estimator and Maximum Likelihood Estimator of unknown parameters. We use a random simulation method to compare the two.

The following program provides an evaluation of the two.

S = 5;

N = 10000;

Mse1 = 0; mse2 = 0;

For k = 1: N

X = 5. * rand (1, 50 );

S1 = 2 * mean (x );

S2 = max (x );

Mse1 = mse1 + (s1-s) ^ 2;

Mse2 = mse2 + (s2-s) ^ 2;

End

Mse1 = mse1/N; mse2 = mse2/N;

[Mse1, mse2]

Reference running result: 0.1655 0.0186

In this example, the maximum likelihood estimation accuracy is high. Note that the moment method estimator is unbiased. In this example, the maximum likelihood estimator is obviously biased and must be small.

2.1.2Validity

For unbiased estimation, the second item is zero. Therefore, to compare two unbiased estimator, you only need to compare their variance. A non-biased estimator with a small variance is valid, of course, it refers to two non-biased estimates.

2.1.3Consistency

Set as an estimator of an unknown population parameter.

(2-2)

It is called the consistent estimator. RuO

(2-3)

This is called strongly-Consistent Estimator.

The larger the sample size, the more accurate the estimation value.

2.2 interval estimation

The so-called interval estimation is to use two estimator and estimate unknown parameters, so that the probability of a random interval containing unknown parameters is specified. That is:

The confidence interval that meets the preceding conditions is called the confidence level. It is called the lower confidence limit and the upper confidence limit.

2.2.1Confidence interval of the mean of A Single Normal Population

(1) known variance

Table query: Yes ,.

For samples in the population, the confidence interval is:

(2-4)

Norminv (1-a/2) can be used for calculation.

Example 2.3

1.1, 2.2, 4.4, 5.5

For a simple random sample from a normal population, the confidence level is 95%.

Use the Matlab command to calculate the solution:

X = [1.1, 2.2, 3.3, 4.4, 5.5];

N = length (x );

M = mean (x );

C = 2.3/sqrt (n );

D = c * normin V (0.975 );

A = m-d; B = m + d;

[A, B]

The calculation result is 1.2840 5.3160.

(2) unknown variance

For samples in the population, the confidence interval is:

(2-4)

It is the critical value of the Degree of Freedom distribution.

The data is the same as above. Continue to use Matlab for computation.

S = std (x); dd = S * tinv (0.975, 4)/sqrt (n );

Aa = m-dd; bb = m + dd; [aa, bb]

The result is 1.1404 5.4596.

2.2.2Confidence interval of a single normal population variance

Because the query results obtain the critical value and

Then the confidence interval is

(2-5)

The table can be queried using chi2inv. The data is the same as above, and the following confidence interval is obtained.

C1 = chi2inv (0.025, 4 );

C2 = chi2inv (0.975, 4 );

T = (n-1) * var (x );

Aaa = T/c2; bbb = T/c1;

[Aaa, bbb]

The calculation result is 1.0859 24.9784.

2.2.3Confidence Interval of mean difference between two normal populations

(1) known variance

Set, and the two samples are independent. The confidence interval is

(2-6)

Here we know that it can be obtained using norminv (0.975), and Matlab computing is very easy.

(2) The variance is unknown but equal:

The confidence interval is

(2-7)

The degree of freedom is used.

2.2.4Confidence interval of two normal population variance ratios

In this case, the distribution threshold table for the degree of freedom is used to make

Then the confidence interval is:

(2-7)

In Example 2.4, two lathes are set up to process the same part, each of which is 8 parts. The length error is:

A:-0.12-0.80-0.05-0.04-0.01 0.05 0.07

B:-1.50-0.80-0.40-0.10 0.20 0.61 0.82

Returns the confidence interval of the variance ratio.

The solution is calculated using Matlab as follows:

X = [-0.12,-0.80,-0.05,-0.04,-0.01, 0.05, 0.07];

Y = [-1.50,-0.80,-0.40,-0.10, 0.20, 0.61, 0.82];

V1 = var (x); v2 = var (y );

C1 = finv (0.025, 7,7); c2 = finv (0.975, 7,7 );

A = (V1/V2)/C2; B = (V1/V2)/C1; [a, B]

Calculation Result: 0.0229 0.5720

The probability of variance ratio less than 1 is at least 95%, which indicates that the accuracy of Lathe A is significantly higher.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.