| 2 | |
| 3 | == Micro-experiments == |
| 4 | |
| 5 | Suppose you have two alternative lessons for a given concept. |
| 6 | They may be completely different, |
| 7 | or they may differ in appearance. |
| 8 | Which is better? |
| 9 | Or is each better for some identifiable subset of students? |
| 10 | To investigate, create a '''micro-experiment''' |
| 11 | in which students are randomly shown one lesson or the other, |
| 12 | and then perform an exercise. |
| 13 | {{{ |
| 14 | function show_lesson() { |
| 15 | return select( |
| 16 | name('show_lesson'), |
| 17 | valuator('rand'), |
| 18 | lesson( |
| 19 | filename('lesson1.php') |
| 20 | ), |
| 21 | lesson( |
| 22 | filename('lesson2.php') |
| 23 | ), |
| 24 | } |
| 25 | ); |
| 26 | |
| 27 | return sequence( |
| 28 | name('course'), |
| 29 | show_lesson(), |
| 30 | exercise( |
| 31 | filename('exercise.php') |
| 32 | ) |
| 33 | ); |
| 34 | }}} |
| 35 | |
| 36 | This uses a new control structure, '''select()'''. |
| 37 | This takes a 'valuator' function (in this case, random) |
| 38 | and a set of units. |
| 39 | It shows the unit for which the valuator function has the largest value. |
| 40 | |
| 41 | == Lesson comparison == |
| 42 | |
| 43 | After a number of students have passed through the micro-experiment, |
| 44 | you may have enough data to conclude something about your lessons. |
| 45 | To do this, go to the course Control Panel |
| 46 | and click Lesson Compare. |