# How can we randomise blocks of questions in the ratio 1/3?

We want to make sure that the randomised blocks (3) of questions appear  1/3 for every block in the sample. We did the randomisation with of the blocks with a list.
How can we now make sure of the ration 1/3?
I'm not sure I follow.  Each respondent is only meant to see one of those three blocks?  And you want one-third of the respondents to see each one?
Yes, each respondent is meant to see one of the three blocks. But we want to make sure that the overall ratio of the blocks in the whole sample size is 1 to 3.
If you're on Lighthouse Studio 9.7, quota questions can be set to Least Fill, which can be used to distribute respondents into three quota cells as evenly as possible.
We only can use an old version 8.5 something. Is there also a similar solution existing?

Create a quota question with three quota cells.  The cell values should be 1, 2, and 3.  Set the quota question to randomize all quota cells.  Now give each quota cell this qualification logic:

```Begin Unverified Perl
# Parameters
my \$quotaName = 'QuotaQ';
my \$thisCell = 1;
my \$numberOfCells = 3;

# Run
my \$qual = 1;

my \$thisFill = QUOTACELLCOMPLETES(\$quotaName, \$thisCell) / QUOTACELLLIMIT(\$quotaName, \$thisCell);
for (my \$i = 1; \$i <= \$numberOfCells; \$i++) {
if (\$i != \$thisCell) {
my \$ithFill = QUOTACELLCOMPLETES(\$quotaName, \$i) / QUOTACELLLIMIT(\$quotaName, \$i);
if (\$ithFill < \$thisFill) {
\$qual = 0;
last;
}
}
}

return \$qual;
End Unverified
```

Line 3 must be updated with the name of the quota question.  Line 4 must be updated in each quota cell with which cell number the code is being put into.

Finally, you can use skips to skip respondents to one of the three blocks of questions based on which quota cell they ended up in.
answered Jun 17, 2019 by Platinum (134,075 points)