Calculating Median
David Morrison - Corporate
dmorrison@mcbrideelectric.com
Wed, 28 Jul 2004 12:45:47 -0700
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.
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.
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 have an idea on how to calculate the Median for a list of
numbers using Quiz?
Blair Combs
Idaho State University
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" 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.