Help:Random True or False (condition)
HELP PAGE DISCUSSION CLOSE
Revision as of 23:21, 24 March 2013 by Matt (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Random True/False condition type allows you to create a condition that will randomly return true a certain percentage of the time. You can use it on its own or in combination with other conditions in order to display questions or content on a random basis. We allow you to select the percentage of time (between 0% to 100% not inclusive) to an accuracy of one trillionth of one percent.


frequency

By selecting the HIDE option for Action the question will only be hidden when the conditions defined under field Conditions meet the requirements of Matching. This is the default selection and should be used unless you have a specific reason to select the "SHOW" option and understand the potential pitfalls.


Combining Random True/False with Other Conditions

You may also combine the output of a random true/false condition with other conditions, as you normally would combine conditions. For instance, suppose you defined two conditions (one random with a 50% chance of true frequency) and the other dependent on a respondent's answer to a multiple choice question, so that the condition was true only when they answered question #2 with the "A" response. If you chose a Matching of "ALL" and an Action of "HIDE", the current question or content would only be shown to everyone except 50% of the people who had answered "A" to question #2. That is probably not what you want, so in this case, you would enter a "CUSTOM" combination for Matching your conditions, so that you can keep the Action set to "HIDE". This custom condition would look like:

NOT(1 AND 2)

That will ensure that the question is hidden whenever either your random true/false returns false or when the answer to question #2 is not "A". You could have left Matching on "ALL" and set Action to "SHOW" for the same results, but it is discussed on the Display page why setting Display to "SHOW" is not preferable.


There are many other unique behaviors that can be accomplished with Random True/False conditions, such as selecting a certain percentage of respondents to win a prize, presenting random participants with different survey questions and much more.


Algorithm Explanation and Warning

Although we have attempted to ensure that our software will correctly return a random true for the designated percentage of time, if you have an expensive contest riding on the random selection of a winner, you may wish to select that person using our own software. Our algorithm uses Perl's rand() function to generate a floating point number from 0 up to, but not including 100. We then compare your entered percentage to the returned value of rand(100), and if the returned value is less than the number you entered, the condition will return true. Because of the nature of truly random selection, even if you enter a percentage of .0001%, it is possible (although unlikely) for the condition to be true for two respondent's in a row. Although over time it should approach your random percentage, the events are independent and the possibility (however remote) does exist.


See also