[From Bill Powers (971120.1943 MST)]
Kennaway, Taylor, and Abbott (971120) --
I'm attaching the code for the program that generates the data and analysis
for the article in ABS, 'random.pas'. Also included is 'stats.pas', a unit
that calculates the correlations. The program, adapted as a demo, is more
or less self-explanatory.
This is not really a "third variable" effect; it's more a "wrong model"
effect. What I did was to set up a situation in which people could earn
"rewards" over a range of wages by putting out effort. "Costs" varied
randomly for everyone, subtracting random amounts from the produced reward.
The basic (naive) analysis is done as if effort is caused to increase by
the amount of obtained reward. That is, the more reward there is, the more
effort one would expect if reward causes effort. The straightforward S-R
analysis would simply assume a linear relation between cause and effect,
and calculate the correlation and regression line relating effort to reward
for the population. The result is, as the S-R hypothesis would predict,
that greater effort results from greater reward. The unpredictable "cost"
factor adds noise to the data.
Unbeknowst to the analyst, however, the individuals in this population are
all control systems rather than S-R systems. Instead of the effort output
being controlled by the reward input, the reward input is controlled by the
effort output. Each individual wants a different specific amount of reward,
and will put out effort proportional to the shortfall of received reward
below desired reward.
The random cost subtracted from the received reward represents
noncontrolled variables such as fatigue, variations in working conditions,
and everything else that can randomly contaminate the observed relationship.
Because the individuals are control systems, an increase in cost reduces
the reward, increases the error, and results in an increase in behavior.
Thus there is a strong negative relationship between reward and effort for
each individual.
I used the labels "effort", "reward", and "cost" for the variables in the
simulation, but just by changing the labels we could show that this
phenomenon would occur for any IV-DV relationship if the "DV" is really the
output of a control system controlling an effect of the "IV". The
population measures will show a positive relationship between IV and DV;
the control system equations will show a negative relationship for every
individual.
One of the basic assumptions in IV-DV analysis is that by selecting many
subjects randomly from within a large population, noncontrolled influences
on the behavior will tend to average out. But in this case, one of those
random influences, the reference level for reward, is directly responsible
for the false appearance of a positive relationship between IV and DV. The
control systems with high reference levels for reward will put out a lot of
effort, since that is required to satisfy the reference condition, while
those with low reference levels for reward will put out less effort, less
effort being required to achieve a lower reference condition of reward. In
the plot of effort versus reward, the subjects naturally sort themselves
along the effort dimension, the systems with higher reference levels
appearing farthest to the right in the plot.
I think some of the criticisms of my references to this simulation have
been based on a misunderstanding of what it is. I hope this clears up those
problems.
Best,
Bill P.
program randm;
uses dos,crt,graph,grutils,stats;
{demonstrates appearance of a plot between random variables with a
systematic component, computes correlation, regression, and percent
standard error of estimate from regression line. Then does same thing
for subjects who want same number of units of reward. }
label exrand;
const maxdata = 3999;
var v1,v2,ref,c1,c2: array[0..maxdata] of integer;
c,r1,r2,e: real;
i,j,r0,origin,passes,vloc,reflev,firstpass: integer;
b,k,d,effort,reward: real;
n,n1,n2: string[60];
ch: char;
hsize,vsize,hcenter,vcenter: integer;
procedure initscreen;
begin
initgraphics;
hsize := getmaxx; vsize := getmaxy;
hcenter := (hsize+1) div 2;
vcenter := (vsize + 1) div 2;
end;
begin
initscreen;
restorecrtmode; clrscr;
gotoxy(1,2); write(
' DEMONSTRATION OF DIFFERENCE BETWEEN MASS AND INDIVIDUAL MEASURES.');
gotoxy(1,4); write(
' First a plot of 4000 control systems is shown. Each system wants a');
gotoxy(1,5); write(
'randomly-selected amount of reward (100 .. 300 units). Each system has a');
gotoxy(1,6);
if graphdriver = CGA then
write(
'randomly-selected cost (0..40 units) and "wage" (2.5 to 6.0 units per')
else write(
'randomly-selected cost (0..40 units) and "wage" (1.5 to 5.0 units per');
gotoxy(1,7); write(
'unit of effort). After plot, "q" quits, space to go on.');
gotoxy(1,8); write(
'After a space, the program then plots points for all systems that want the');
gotoxy(1,9); write(
'same amount of reward (picked at random). Again, "q" to quit,');
gotoxy(1,10); write(
'or space to plot another subgroup.');
gotoxy(1,16); write(
' SPACE TO START PROGRAM');
ch := readkey;
if ch in ['q','Q'] then exit;
clrscr; gotoxy(17,12);
write('CREATING 4000 SAMPLES OF CONTROL SYSTEM BEHAVIOR');
origin := (hsize - 300) div 2; randomize;
firstpass := 0;
for i := 0 to maxdata do
begin
if graphdriver = CGA then
b := 2.5 + 3.5 * random
else b := 1.5 + 3.5 * random;
k := 5.0;
d := -random(40);
r0 := 100 + random(200);
effort := k * (r0 - d)/ (1.0 + k * b);
reward := (b * k * r0 + d) / (1.0 + k * b);
v2[i] := round(effort);
v1[i] := round(reward);
ref[i] := r0;
end;
clrscr;
setgraphmode(graphmode); clearviewport;
vloc := (3 * vsize) div 4;
repeat
j := 0; reflev := 100 + random(200);
for i := 0 to maxdata do
begin
if ref[i] = reflev then
begin
c1[j] := v1[i];
c2[j] := v2[i];
inc(j);
end;
end;
for passes := firstpass to 1 do
begin
clearviewport;
if passes = 0 then
for i := 0 to maxdata do
putpixel(origin +v1[i],vloc - v2[i],white)
else
for i := 0 to j - 1 do
putpixel(origin +c1[i],vloc - c2[i],white);
for i := 0 to 300 do putpixel(origin +i,vloc,white);
for i := 0 to vloc do putpixel(origin,i,white);
if passes = 0 then begin
correl('i',@v1,@v2,maxdata + 1);
c := corr;
end
else begin
correl('i',@c1,@c2,j);
c := corr;
end;
if passes = 0 then r1 := regression else r2 := regression;
if c > 1.0 then c := 1.0;
e := sigy*sqrt(1 - c * c);
if passes = 0 then
for i := 80 to 300 do
putpixel(origin +i,
vloc - round((ybar + (i - xbar) * r1)),white);
outtextxy(origin + 8,10,'EFFORT');
outtextxy(origin + 310, vloc - 4,'REWARD');
outtextxy(origin - 4,vloc - 50,'- 50');
outtextxy(origin - 4,vloc - 100,'- 100');
outtextxy(origin - 4,vloc - 150,'- 150');
outtextxy(origin - 4,vloc - 200,'- 200');
outtextxy(origin + 200,vloc - 3,'|');
outtextxy(origin + 188,vloc + 5,'200');
str(c:5:3,n); n := 'Correlation, E:R = ' + n;
outtextxy(origin + 65,vloc + 20,n);
if passes = 0 then str(maxdata + 1,n) else str(j,n);
n := 'n = ' + n;
outtextxy(origin + 126,vloc + 30,n);
if passes = 0 then
begin
outtextxy(origin + 128,vloc + 40,'FIG. 1');
outtextxy(origin + 220, vloc - 20, ' 99 < ref < 301');
end
else
begin
str(reflev,n);
outtextxy(origin + 128, vloc + 40, 'FIG. 2');
outtextxy(origin + 220, vloc - 20, 'Ref = ' + n);
end;
if passes = 0 then
begin
str(r1:5:2,n);
str(xbar:5:2,n1);
str(ybar:5:2,n2);
end
else
begin
str(abs(r2):5:3,n);
str(xbar:5:2,n1);
str(ybar:5:2,n2);
end;
if passes = 0 then
n := 'E = ' + n2 + ' + ' + n + '(R' + ' - ' + n1 + ')'
else
n := 'E = ' + n2 + ' - ' + n + '(R' + ' - ' + n1 + ')';
outtextxy(origin + 100,10,n);
if passes = 1 then
begin
str( (-ybar/r2 + xbar):5:1,n);
n := 'For E = 0, R = ' + n;
outtextxy(origin + 100,25,n);
end;
outtextxy(0,vsize - 10,'q:quit, space:more');
ch := readkey;
if ch in ['q','Q'] then goto exrand;
firstpass := 1;
end; { of second pass }
until ch in ['q','Q'];
exrand:
restorecrtmode;
closegraph;
end.
{$N+}
unit stats;
interface
var sx,sy,sx2,sy2,sxy,xbar,ybar,sigx,sigy,corr,regression,intercept: real;
procedure correl(ty: char; x,y: pointer ; datasize: integer);
implementation
type dataarraytype = array[0..2047] of integer;
rdataarraytype = array[0..2047] of real;
dataptrtype = ^dataarraytype;
rdataptrtype = ^rdataarraytype;
procedure correl;
var n,u,v,w,z: real;
i: integer;
dxptr,dyptr: dataptrtype;
rdxptr,rdyptr: rdataptrtype;
begin
if ty = 'i' then
begin
dxptr := x; dyptr := y;
end
else
begin
rdxptr := x; rdyptr := y;
end;
sx := 0.0; sy := 0.0;
n := datasize;
for i := 0 to datasize - 1 do
begin
if ty = 'i' then
begin
u := dxptr^[i]; v := dyptr^[i];
end
else
begin
u := rdxptr^[i]; v := rdyptr^[i];
end;
sx := sx + u; sy := sy + v;
end;
xbar := sx/n; ybar := sy/n;
sx2 := 0.0; sy2 := 0.0; sxy := 0.0;
for i := 0 to datasize - 1 do
begin
if ty = 'i' then
begin
u := dxptr^[i]; v := dyptr^[i];
end
else
begin
u := rdxptr^[i]; v := rdyptr^[i];
end;
sx2 := sx2 + (u - xbar)*(u - xbar);
sy2 := sy2 + (v - ybar)*(v - ybar);
sxy := sxy + (u - xbar)*(v - ybar);
end;
sigx :=sqrt(sx2/n);
sigy :=sqrt(sy2/n);
if (abs(sigx*sigy) > 0.0001) then
z := sxy/(n * sigx * sigy)
else z := 0.0;
corr := z;
if abs(sigx) > 0.001 then regression := z * sigy/sigx
else regression := 9999.99;
intercept := ybar - regression*xbar;
end;
end.From ???@??? Fri Nov 21 09:57:26 1997
Return-Path: owner-csgnet@POSTOFFICE.CSO.UIUC.EDU
Received: from beasley.cisco.com (mailgate-sj-2.cisco.com [171.69.2.135]) by pilgrim.cisco.com (8.8.5-Cisco.1/8.6.5) with ESMTP id BAA19354 for <bnevin@pilgrim.cisco.com>; Fri, 21 Nov 1997 01:20:03 -0500 (EST)
Received: from proxy1.cisco.com (proxy1.cisco.com [192.31.7.88]) by beasley.cisco.com (8.8.4-Cisco.1/CISCO.GATE.1.1) with ESMTP id WAA07838 for <bnevin@CISCO.COM>; Thu, 20 Nov 1997 22:20:01 -0800 (PST)
Received: (from smap@localhost)
by proxy1.cisco.com (8.8.7/8.8.5) id WAA19435
for <bnevin@CISCO.COM>; Thu, 20 Nov 1997 22:20:00 -0800 (PST)
Received: from postoffice.cso.uiuc.edu(128.174.5.11) by proxy1.cisco.com via smap (V2.0)
id xma019413; Fri, 21 Nov 97 06:19:56 GMT
Received: from postoffice.cso.uiuc.edu (postoffice.cso.uiuc.edu [128.174.5.11])
by postoffice.cso.uiuc.edu (8.8.5/8.8.5) with SMTP id AAA21754;
Fri, 21 Nov 1997 00:17:35 -0600
Received: from POSTOFFICE.CSO.UIUC.EDU by POSTOFFICE.CSO.UIUC.EDU
(LISTSERV-TCP/IP release 1.8b) with spool id 7066310 for
CSGNET@POSTOFFICE.CSO.UIUC.EDU; Fri, 21 Nov 1997 00:17:28 -0600
Received: from AUVM.AMERICAN.EDU (smtp@auvm.american.edu [147.9.1.2]) by
postoffice.cso.uiuc.edu (8.8.5/8.8.5) with SMTP id AAA29368 for
<CSGNET@POSTOFFICE.CSO.UIUC.EDU>; Fri, 21 Nov 1997 00:07:37 -0600
Received: from AUVM.AMERICAN.EDU by AUVM.AMERICAN.EDU (IBM VM SMTP V2R2) with
BSMTP id 2546; Fri, 21 Nov 97 01:02:24 EST
Received: from AUVM.AMERICAN.EDU (NJE origin NETNEWS@AUVM) by AUVM.AMERICAN.EDU
(LMail V1.2a/1.8a) with BSMTP id 4706; Fri, 21 Nov 1997 01:02:18 -0500
Path: auvm!paladin.american.edu!news.indiana.edu!vixen.cso.uiuc.edu!
howland.erols.net!newsfeed.internetmci.com!192.87.106.104!surfnet.nl!news.tue.
nl!usenet
Lines: 129
NNTP-Posting-Host: annex2s1.urc.tue.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (Win95; I)
Xref: paladin.american.edu bit.sci.purposive-behavior:9734
Message-ID: <3474F690.2490@ele.tue.nl>
<CSGNET@POSTOFFICE.CSO.UIUC.EDU>
Sender: "Control Systems Group Network (CSGnet)"
<CSGNET@POSTOFFICE.CSO.UIUC.EDU>
Organization: Eindhoven University of Technology, The Netherlands
<CSGNET@POSTOFFICE.CSO.UIUC.EDU>
X-UIDL: e9d2a3f7211c00978eb88e36b316206c
[Hans Blom, 971121]
(Bill Powes (971120.0655 MST))
Imagine that you were perfectly able to predict the future, yet the
future was not fully predetermined and you were still free to choose
your actions. You would know, for instance, what the stock market
would do the coming week and which lottery ticket would show up with
the winning number tomorrow. You can easily come up with even more
desirable predictions. No doubt most people would consider themselves
to be far better in control than we are now.
True, but this is a fairy-tale. Don't get me wrong: I'm not saying that
predicting the future is useless, especially when we're talking about
population effects. But I think people have relied too much on planning and
prediction, which (in the real world) are very limited in their capacity to
forecast correctly. It is at least as important to be able to deal with
disturbances as they arise, even when one does not know they exist and has
not anticipated them.
Yes, I did present the ideal situation of perfect prediction and no
noise.
To make a principle clear it often helps to present it in its ideal
form.
Of course I agree with you that this ideal is far from what we normally
encounter in daily life, where we are plagued by all types of
uncertainties.
If you relied entirely on prediction, you'd be helpless the moment something
unpredicted happened.
I would put this even more strongly: something entirely unpredictable
cannot
be coped with, except maybe by accident -- and hence with probability
zero.
The more important it is to predict correctly, the higher will be the cost
when the prediction is wrong.
What do you mean here? I perceive only a tautology.
Thus humans invent ways to forecast the future. We cannot _know_ the
environment function, but we can make a more or less accurate guess
of what it is. And the more accurate that guess is, the better we are
able to control.
That's true, but this doesn't mean that all control can be substantially
improved by making good predictions. If you can already control in the
presence of the kind of disturbances that actually occur, and do it so well
that any further improvement would be of negligible importance, investing
in a lot of predictive machinery would be a waste of resources.
Here you describe the situation where learning is finished and cannot be
improved. Or where there is/can be no learning. You may well be right
that
this is so for the lower five or six levels of control in the HPCT
hierarchy,
although sensor adaptation might be considered a primitive form of
learning
as well, for instance.
Don't forget that even after you have predicted what is likely to happen,
and have selected the appropriate action to take, you still must turn that
selection into the actual action that has the required effect. And that
requires present-time closed-loop control, because even your muscles act in
unpredictable ways, gaining and losing sensitivity to neural signals
according to recent use.
Yes, I was talking about the idealized case where there are no
"unpredictable
ways". I wonder, however, what you mean with "present-time" control. I
thought
that in an earlier discussion we had established that control can only
influence
the _future_ state of affairs; the present is there already and cannot
be changed
anymore. Reference levels necessarily refer to the future. Right _now_
we have to
set the reference for _then_. The point is: how far into the future? Do
we just
take the very near future into account, or is it also (our expectation
about) the
far-away future that influences how we act? I could point at numerous
examples
where this is the case. A great deal of our economy is concerned with
attempts to
provide people with future "certainty", i.e. predictability. Even though
the risk
exists that the director of your pension fund is an embezzler...
And this type of counting on the far-reaching, reliable effect of
present-time actions
certainly isn't limited to humans only. Bears "insure" themselves by
eating enough --
but not too much -- before they start their winter sleep. Chipmunks (?)
bury nuts in
times when they are available in plenty to dig them up again in times of
scarcity.
And of course the details of the external world keep shifting in countless
ways,
so you have to be able to vary your actions according to the current external
circumstances, only a small part of which you can sense.
Sure. Our predictions cannot be perfect; the world is far too complex.
Yet I would bet
that normally some predictability helps some.
You can't plan how you're going to turn the steering wheel before you take the
automobile trip.
Yet you're pretty sure that when you turn the steering wheel to the
right, the car
will turn right. If you could not count on a rather reliable
relationships between the
two, you wouldn't take that trip. Not in that car...
It's nice to be able to predict the future, but in my opinion we trust our
predictions too much and tend to forget the failures, at the expense of
learning how to deal with life as it happens.
I fully agree with you. In no way, however, that contradicts my thesis
that control
would be impossible without reliable, trustworthy predictabilities. As
we demand in
that car.
Greetings,
Hans
···
Date: Fri, 21 Nov 1997 03:48:48 +0100
Reply-To: "Control Systems Group Network (CSGnet)"
From: Hans Blom <j.a.blom@ELE.TUE.NL>
Subject: prediction
To: Multiple recipients of list CSGNET