Okay, lets apply these tools to an actual economics problem. Suppose we want to relate consumer demand for coffee QC to four variables: the price of coffee PC, the price of tea PT, the price of non-dairy coffee creamer PN and consumer income I. We can specify and test a linear demand model
QC = b0 + b1PC + b2PT + b3PN + b4I
obs QC PC
PT PN
I
1 3 $1.04 $1.77 $0.29
$11,300
2 6 $0.95 $2.15 $0.26
$10,500
3 5 $0.88 $1.66 $0.23
$14,700
4 4 $0.95 $1.58 $0.22
$26,600
5 6 $0.90 $2.07 $0.24
$13,200
6 4 $1.16 $1.99 $0.28
$80,700
7 4 $0.95 $1.49 $0.20
$45,600
8 5 $1.04 $2.35 $0.28
$28,100
9 8 $0.87 $2.17 $0.28
$18,600
10 4 $0.97 $1.63 $0.26
$44,400
11 10 $1.08 $1.80 $0.27 $77,100
12 6 $0.93 $1.96 $0.28
$50,800
13 2 $1.15 $1.88 $0.28
$13,400
14 0 $1.11 $1.48 $0.25
$12,800
15 3 $1.08 $1.99 $0.20
$32,900
16 7 $1.00 $2.20 $0.26
$32,500
17 3 $1.11 $1.52 $0.23
$60,600
18 3 $1.15 $1.74 $0.20
$13,900
19 2 $1.11 $1.68 $0.25
$47,500
20 8 $0.96 $1.88 $0.26
$54,100
21 10 $0.91 $2.16 $0.26 $61,000
22 2 $1.16 $1.64 $0.26
$24,900