Google Answers Logo
View Question
 
Q: ^Probability question ( No Answer,   5 Comments )
Question  
Subject: ^Probability question
Category: Computers
Asked by: dai_hop-ga
List Price: $2.00
Posted: 07 Feb 2006 11:21 PST
Expires: 09 Mar 2006 11:21 PST
Question ID: 442702
How much would it cost to work out the following mathmatical scenario:

In a project I am developing there is a section where the application
loads 5 quiz questions from a database of 20 quiz questions.

the user accesses the quiz home node and the quiz is assembled, he/she
completes the quiz of five questions and decides to take the quiz
again. He/she navigates back the quiz home node where the database is
queried for a second time to obtain the questions for the second quiz.

If the database records are accessed in a serial manner:

What is the probability that the second quiz will contain the same
questions as the first quiz?

If the second quiz contains the same questions as the first. What is
the probability that their order will be the same?

And...

If the database records are accessed in a random manner:

What is the probability that the second quiz will contain the same
questions as the first quiz?

If the second quiz contains the same questions as the first. What is
the probability that their order will be the same?

Clarification of Question by dai_hop-ga on 08 Feb 2006 03:41 PST
When I say "accessed in a serial manner" i mean that the selection
process starts at the first record and then selects five records one
after another.

It is my reckoning that these probabilites are as follows...

What is the probability that the second quiz will contain the same
questions as the first quiz?

100% probabilty

If the second quiz contains the same questions as the first. What is
the probability that their order will be the same?

100% probabilty

...because although the database contains 20 questions, only the first
five questions are being selected.

Am I correct?

If so, would it be possible for you to show me the workings please?
Answer  
There is no answer at this time.

Comments  
Subject: Re: ^Probability question
From: hfshaw-ga on 07 Feb 2006 16:27 PST
 
What do you mean by "accessed in a serial manner"?  Do you mean that
the first of the 5 questions is chosen at random from the 2 available,
and then the remaining 4 questions are simply the ones that follow in
database order after that first random choice, or do you have
something else in mind?

Are you only interested in the probability that all 5 questions are
duplicated on the two instances of the test, or are you also
interested in the probability of N matches (N=1,2,3,4,5)?
Subject: Re: ^Probability question
From: ansel001-ga on 08 Feb 2006 00:46 PST
 
I'm not sure what you mean by "accessed in a serial manner" either so
I'll confine my comment to when the questions are "accessed in a
random manner".

The chance of getting the same 5 questions again with the order unimportant is:

(5/20) x (4/19) x (3/18) x (2/17) x (1/16) = 1/15504 = 6.4499484 x 10^(-5)

If you want the same 5 questions in the same order the chances are:

(1/20) x (1/19) x (1/18) x (1/17) x (1/16) = 1/1,860,480 = 5.374957 x 10^(-7)
Subject: Re: ^Probability question
From: dai_hop-ga on 08 Feb 2006 03:40 PST
 
When I say "accessed in a serial manner" i mean that the selection
process starts at the first record and then selects five records one
after another.

It is my reckoning that these probabilites are as follows...

What is the probability that the second quiz will contain the same
questions as the first quiz?

100% probabilty

If the second quiz contains the same questions as the first. What is
the probability that their order will be the same?

100% probabilty

...because although the database contains 20 questions, only the first
five questions are being selected.

Am I correct?

If so, would it be possible for you to show me the workings please?
Subject: Re: ^Probability question
From: chisophugis-ga on 16 Feb 2006 16:50 PST
 
tHAT IS EASY

THE PROBABILITY IS 1:1,978,234 FOR THEM TO CONTAIN THE SAME QUESTIONS AS THE FIRST 

AND

THE PROBABILITY IS 1:12,452,907,451 FOR THEM TO CONTAIN THE SAME
QUESTIONS IN THE SAME ORDER
Subject: Re: ^Probability question
From: manuka-ga on 28 Feb 2006 00:35 PST
 
I don't really see why this question is so difficult to interpret...

If the database records are accessed in a serial manner, then the
first time the quiz is run it will contain questions 1, 2, 3, 4 and 5
(in order). The next time it will contain 6, 7, 8, 9, and 10 (in
order), and so on.

On the assumption that the average number of users at any one time is
significantly more than 1, each time a given user runs the quiz they
are essentially selecting at random between the following ordered
question sets:
1, 2, 3, 4, 5
6, 7, 8, 9, 10
11, 12, 13, 14, 15
16, 17, 18, 19, 20
Thus there is a 25% chance that they will get the same set of
questions, and if they do there is a 100% chance that the order will
be the same.

With random access, ansel001 is correct for the first part of the
question. For the second part, note the clause that says "If the
second quiz contains the same questions as the first..." - so we are
assuming that we have the same five questions; the probability of
getting them in the same order is just
(1/5) * (1/4) * (1/3) * (1/2) * 1 = 1/120. (Or, if you know
permutation theory, the number of orders is 5P5 = 5! = 120, so the
probability of getting the same one is 1/120.)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy