http://learn.cemetech.net/index.php?title=TI-BASIC:Mean&feed=atom&action=historyTI-BASIC:Mean - Revision history2022-01-27T11:11:56ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=TI-BASIC:Mean&diff=740&oldid=prevMaintenance script: Initial automated import2016-02-24T18:16:14Z<p>Initial automated import</p>
<p><b>New page</b></p><div>{{Template:TI-BASIC:Command<br />
|picture=MEAN.GIF<br />
|summary=Finds the mean (the average) of a list.<br />
|syntax=mean(''list'',[''freqlist''])<br />
|location=Press:<br />
# 2ND LIST to enter the LIST menu.<br />
# LEFT to enter the MATH submenu.<br />
# 3 to select mean(, or use arrows.<br />
|compatibility=TI-83/84/+/SE<br />
|size=1 byte<br />
}}<br />
<br />
The mean( command finds the [http://en.wikipedia.org/wiki/Mean mean], or the average, of a list. It's pretty elementary. It takes a list of real numbers as a parameter. For example:<br />
<br />
:Prompt L1<br />
:Disp "MEAN OF L1",mean(L1<br />
<br />
That's not all, however. Awesome as the mean( command is, it can also take a frequency list argument, for situations when your elements occur more than once. For example:<br />
<br />
:Disp mean({1,2,3},{5,4,4})<br />
<br />
is short for<br />
<br />
:mean({1,1,1,1,1,2,2,2,2,3,3,3,3})<br />
<br />
The frequency list {5,4,4} means that the first element, 1, occurs 5 times, the second element, 2, occurs 4 times, and the third element, 3, occurs 4 times.<br />
<br />
= Advanced Uses =<br />
<br />
You can also use the frequency list version of mean( to calculate weighted averages. For example, suppose you're trying to average grades in a class where homework is worth 50%, quizzes 20%, and tests 30%. You have a 90% average on homework, 75% on quizzes (didn't study too well), but 95% average on tests. You can now calculate your grade with the mean( command:<br />
<br />
<br />
:mean({90,75,95},{50,20,30<br />
<br />
<br />
You should get a 88.5 if you did everything right.<br />
<br />
Frequency lists don't need to be whole numbers. Amazing as that may sound, your calculator can handle being told that one element of the list occurs 1/3 of a time, and another occurs 22.7 times. It can even handle a frequency of 0 - it will just ignore that element, as though it weren't there. In particular, mean(L1,L2) is effectively equivalent to sum (L1*L2)/sum(L2).<br />
<br />
One caveat, though - if all of the elements occur 0 times, there's nothing to take an average of and your calculator will throw an error.<br />
<br />
= Error Conditions =<br />
<br />
* '''[[TI-BASIC:Errors#datatype|ERR:DATA TYPE]]''' is thrown, among other cases, if the data list is complex, or if the frequencies are not all positive and real.<br />
* '''[[TI-BASIC:Errors#dimmismatch|ERR:DIM MISMATCH]]''' is thrown if the frequency list and the data list have a different number of elements.<br />
* '''[[TI-BASIC:Errors#divideby0|ERR:DIVIDE BY 0]]''' is thrown if the frequency list's elements are all 0.<br />
<br />
= Related Commands =<br />
<br />
* [[TI-BASIC:Median|median(]]<br />
* [[TI-BASIC:Stddev|stdDev(]]<br />
* [[TI-BASIC:Variance|variance(]][[Category:TI-BASIC]]<br />
[[Category:TIBD]]</div>Maintenance script