ผลต่างระหว่างรุ่นของ "Probstat/week14 practice 1"
ไปยังการนำทาง
ไปยังการค้นหา
.
Jittat (คุย | มีส่วนร่วม) (หน้าที่ถูกสร้างด้วย '== Least Square Estimators == == Multiple linear regression ==') |
Jittat (คุย | มีส่วนร่วม) |
||
(ไม่แสดง 7 รุ่นระหว่างกลางโดยผู้ใช้คนเดียวกัน) | |||
แถว 1: | แถว 1: | ||
− | == Least | + | : ''This is part of [[probstat]]''. |
+ | |||
+ | == Least square estimators == | ||
+ | 1. You should work in pairs. Try the following for <math>n=3, 5, 20, 100</math> | ||
+ | |||
+ | * First, you pick a parameter <math>\alpha</math> and <math>\beta</math> and generate a sample of size <math>n</math> using the formula: | ||
+ | |||
+ | <center><math>Y = \alpha + \beta x + e</math></center> | ||
+ | |||
+ | Use random values for <math>x</math> in the range that you like. For the error <math>e</math>, you can generate a random error based on a normal distributions. | ||
+ | |||
+ | * Give the data to your partner. | ||
+ | |||
+ | * After you get the data from your friend, find the least square estimators ''A'' and ''B'' for <math>\alpha</math> and <math>\beta</math>. | ||
+ | |||
+ | * Ask for the correct parameters and see how close you get to those parameters as we increase the size of the samples <math>n</math>. | ||
== Multiple linear regression == | == Multiple linear regression == | ||
+ | Follow the same procedure as in the previous section, but try with 2 variables <math>x_1</math> and <math>x_2</math>. I.e., you pick parameter <math>\alpha, \beta_1, \beta_2</math> and generate samples from the following formula | ||
+ | |||
+ | <center><math>Y = \alpha + \beta_1 x_1 + \beta_2 x_2 + e</math>.</center> |
รุ่นแก้ไขปัจจุบันเมื่อ 01:14, 27 พฤศจิกายน 2557
- This is part of probstat.
Least square estimators
1. You should work in pairs. Try the following for
- First, you pick a parameter and and generate a sample of size using the formula:
Use random values for in the range that you like. For the error , you can generate a random error based on a normal distributions.
- Give the data to your partner.
- After you get the data from your friend, find the least square estimators A and B for and .
- Ask for the correct parameters and see how close you get to those parameters as we increase the size of the samples .
Multiple linear regression
Follow the same procedure as in the previous section, but try with 2 variables and . I.e., you pick parameter and generate samples from the following formula