The following is a practise test I am doing:
John is collecting a set of 4 Native Birds cards, from Oatie Flakes cereal packets.
The manufacturers of Oatie Flakes found that some of their machines malfunctioned and 20% of the packets of cereal contain 2 Native Birds cards instead of 1 card.
1. Design a simulation to predict the number of packets of Oatie Flakes that are required to obtain a full set of Native Birds cards.
Describe the simulation in sufficient detail so that another person could repeat it without your help.
Does anyone have any thoughts as to how I should do it?
Something like the following will give you an array containing a sample of the number of boxes needed to obtain a full set
Originally Posted by Paulo1913
for idx=1 to Ncases
nn=0 //number of distinct cards held
cards=zeros(1,4) //array with 1's for held cards 0's otherwise
while nn<4 // loop untill full set held
card=RandomInteger(1,4) //first card in packet
card=RandomInteger(1,4) //second card if present
nn=sum(cards) //total number of distinct cards
Sorry but I don't understand that. Could you please transfer that into words?
Or if anyone else can think of something please let me know