Calculating Median
David Morrison - Corporate
dmorrison@mcbrideelectric.com
Wed, 28 Jul 2004 15:20:03 -0700
This is a multi-part message in MIME format.
------_=_NextPart_001_01C474F1.0753271B
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Blue,
=20
Ah, you're just trying to start trouble on the list-serve aren't you! =
Didn't we just have a discussion about why not to use QUICK when QTP or =
QUIZ will do (and I was on the side of the QUICK solution)?
=20
Cordially,
=20
David Morrison
McBride Electric
=20
-----Original Message-----
From: powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Robert Edis
Sent: Wednesday, July 28, 2004 1:48 PM
To: PowerHouse List
Subject: RE: Calculating Median
=20
Why do it in Quick? Then you have looping, designer files, and =
temporary variables available for the logic. No subfile is required and =
all processing can be done in designer procedures. =20
=20
Added bonus is that user can run screen and get median value any time =
they choose without MIS getting involved.
=20
Blue
David Morrison - Corporate <dmorrison@mcbrideelectric.com> wrote:
Blair,
How about something like this:
Use a QTP program that does the following:
1. First request: Sort the data on the value that you're looking to get =
the median for. Output records to a sub-file at that value, outputting =
the value and COUNT RESET. Put COUNT NORESET into a global temporary =
item.=20
2. Second request: Read the sub-file created in the previous step =
(they're already sorted). Accumulate the total of the counted field in =
each record. Compare that to the global temporary; when it reaches 1/2 =
of that total, you have the median value.=20
David Morrison
McBride Electric
-----Original Message-----
From: powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com] On Behalf Of Blair Combs
Sent: Wednesday, July 28, 2004 12:23 PM
To: Powerhouse Listserv
Subject: Calculating Median
Does anyone ha! ve an idea on how to calculate the Median for a list of=20
numbers using Quiz?
Blair Combs
Idaho State University
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to =
powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe " in message body to =
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to =
powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe " in message body to =
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
------_=_NextPart_001_01C474F1.0753271B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C474B6.5AE0D350">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
{mso-style-type:personal-reply;
mso-ansi-font-size:10.0pt;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Bl=
ue,<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><!=
[if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Ah=
, you’re
just trying to start trouble on the list-serve aren’t you!<span
style=3D"mso-spacerun: yes"> </span>Didn’t we just have a =
discussion about
why not to use QUICK when QTP or QUIZ will do (and I was on the side of =
the
QUICK solution)?<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><!=
[if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>Co=
rdially,<o:p></o:p></span></font></span></p>
<p class=3DMsoNormal><span class=3DEmailStyle15><font size=3D2 =
color=3Dnavy face=3DArial><span
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><!=
[if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=3DMsoAutoSig><!--[if supportFields]><span =
class=3DEmailStyle15><font=20
size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><span =
style=3D'mso-element:field-begin'></span><span=20
style=3D"mso-spacerun: yes"> </span>AUTOTEXTLIST \s "E-mail=20
Signature" <span =
style=3D'mso-element:field-separator'></span></span></font></span><![endi=
f]--><font
color=3Dnavy><span style=3D'color:navy'>David =
Morrison</span></font><font
color=3Dnavy><span =
style=3D'color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></=
p>
<p class=3DMsoAutoSig><font size=3D3 color=3Dnavy face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:navy'>McBride =
Electric</span></font><font
color=3Dnavy><span =
style=3D'color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></=
p>
<p class=3DMsoNormal><!--[if supportFields]><span =
class=3DEmailStyle15><font=20
size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;mso-bidi-font-size:
12.0pt;font-family:Arial'><span =
style=3D'mso-element:field-end'></span></span></font></span><![endif]--><=
span
class=3DEmailStyle15><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblack
face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b>
powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com]<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Robert Edis<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, July 28, =
2004
1:48 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> PowerHouse List<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: Calculating =
Median</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><![if =
!supportEmptyParas]> <![endif]><o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Why do it in
Quick? Then you have looping, designer files, and temporary =
variables
available for the logic. No subfile is required and all processing =
can be
done in designer procedures. </span></font><font =
color=3Dblack><span
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'> </span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Added bonus
is that user can run screen and get median value any time they choose =
without
MIS getting involved.</span></font><font color=3Dblack><span =
style=3D'color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'> </span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Blue<br>
<br>
<b><i><span style=3D'font-weight:bold;font-style:italic'>David Morrison =
-
Corporate <dmorrison@mcbrideelectric.com></span></i></b> =
wrote:</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>
<div style=3D'border:none;border-left:solid #1010FF 1.5pt;padding:0in =
0in 0in 4.0pt'>
<p class=3DMsoNormal =
style=3D'margin-right:.5in;mso-margin-top-alt:auto;mso-margin-bottom-alt:=
auto;margin-left:39.75pt;border:none;mso-border-left-alt:solid #1010FF =
1.5pt;
padding:0in;mso-padding-alt:0in 0in 0in 4.0pt'><font size=3D3 =
color=3Dblack
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt;color:black'>Blair,<br>
<br>
How about something like this:<br>
<br>
Use a QTP program that does the following:<br>
<br>
1. First request: Sort the data on the value that you're looking to get =
the
median for. Output records to a sub-file at that value, outputting the =
value
and COUNT RESET. Put COUNT NORESET into a global temporary item. <br>
<br>
2. Second request: Read the sub-file created in the previous step =
(they're
already sorted). Accumulate the total of the counted field in each =
record.
Compare that to the global temporary; when it reaches 1/2 of that total, =
you
have the median value. <br>
<br>
<br>
David Morrison<br>
McBride Electric<br>
<br>
-----Original Message-----<br>
From: powerh-l-admin@lists.sowder.com =
[mailto:powerh-l-admin@lists.sowder.com]
On Behalf Of Blair Combs<br>
Sent: Wednesday, July 28, 2004 12:23 PM<br>
To: Powerhouse Listserv<br>
Subject: Calculating Median<br>
<br>
Does anyone ha! ve an idea on how to calculate the Median for a list of =
<br>
numbers using Quiz?<br>
<br>
Blair Combs<br>
Idaho State University<br>
<br>
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D<br>
Mailing list: powerh-l@lists.sowder.com<br>
Subscribe: "subscribe" in message body to
powerh-l-request@lists.sowder.com<br>
Unsubscribe: "unsubscribe <PASSWORD>" in message body to
powerh-l-request@lists.sowder.com<br>
http://lists.sowder.com/mailman/listinfo/powerh-l<br>
This list is closed, thus to post to the list you must be a =
subscriber.<br>
<br>
<br>
<br>
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D<br>
Mailing list: powerh-l@lists.sowder.com<br>
Subscribe: "subscribe" in message body to
powerh-l-request@lists.sowder.com<br>
Unsubscribe: "unsubscribe <PASSWORD>" in message body to
powerh-l-request@lists.sowder.com<br>
http://lists.sowder.com/mailman/listinfo/powerh-l<br>
This list is closed, thus to post to the list you must be a =
subscriber.</span></font><font
color=3Dblack><span =
style=3D'color:black;mso-color-alt:windowtext'><o:p></o:p></span></font><=
/p>
</div>
</div>
</body>
</html>
------_=_NextPart_001_01C474F1.0753271B--