Re: preparing multiple choice questions
- To: mathgroup at smc.vnet.net
- Subject: [mg63370] Re: preparing multiple choice questions
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Tue, 27 Dec 2005 04:42:40 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 12/26/05 at 4:59 AM, berbas at anadolu.edu.tr (Baris Erbas) wrote:
>I have been trying to prepare a test of 30 question with multiple
>choices ranging from a-e.
>I want to automatically assign the question numbers and and the
>correct answers using mathematica. All correct answers should be in
>equal quantity, i.e. 6 a, 6 b, . 6 e.
>I tried to use Random with Table however it doesnt produce equal
>number of correct answers. I also tried to look into the
>Statistical packages.
>Is there a way of doing this in Mathematica? Could you please
>froward me to a link if you already know one?
The techniques you tried above will not work since the requirement the frequency of each choice be equal is incompatible with randomness. A uniform distribution over the integers 1 to 5 with enough samples will result in *apporoximately* equal numbers of each but not *exactly* equal numbers of each integer.
If you require equal numbers of each sample, you can achieve some semblence of randomness by using a random permutation. This could be done as follows
In[2]:=
ans = {a, b, c, d, e};
<< "DiscreteMath`"
In[4]:=
Flatten[ans[[#]]&/@
Partition[
RandomPermutation[Mod[Range[30], 5, 1]], 5]]
Out[4]=
{d, a, e, b, a, c, b, e, e,
c, a, b, e, c, b, a, c, d,
c, d, c, a, a, d, b, e, d,
e, b, d}
--
To reply via email subtract one hundred and four