Christian Lawson-Perfect
Member of the e-learning unit in Newcastle University's School of Mathematics and Statistics.
Lead developer of Numbas.
I'm happy to answer any questions - email me.
Christian's activity
Christian Lawson-Perfect created Standard deviation of a list of numbers 11 years, 4 months ago
Christian Lawson-Perfect commented on Descriptive Stats (P): Mode 11 years, 4 months ago
Actually, it's not impossible that the mode of the generated data is something other than the value you generate. A couple of ways of fixing this:
- write a function to calculate the mode of the data, and add a condition (in the variable testing tab) which insists that the mode is mode1
- shuffle the range 1..20 and take the first, say, 5 values. Make a list with the first three values once, the fourth value twice, and the fifth value three times. Then you know that the mode is the fifth value.
Christian Lawson-Perfect commented on Descriptive Stats (P): Mode 11 years, 4 months ago
Have a look at the table function as a nice way to present data, and generate it in lists.
For example, the first set of data could be generated as
data = shuffle(repeat(random(1..20 except mode1),7)+[mode1,mode1,mode1])and then displayed withtable(data).