Skip to content

Instantly share code, notes, and snippets.

@BillFoster
Created February 2, 2012 11:17
Show Gist options
  • Save BillFoster/1722966 to your computer and use it in GitHub Desktop.
Save BillFoster/1722966 to your computer and use it in GitHub Desktop.
tables again
{ notes: " "
name: MAS1341 20122013 CBA2a_1
percentPass: 50
shuffleQuestions: false
rulesets:{
std:[all,fractionNumbers, !collectNumbers,!noLeadingMinus]
}
navigation: {
allowregen: true
showfrontpage: false
reverse: true
browse: true
}
feedback: {
showtotalmark: true
}
questions: [
{
name: MAS1341 20122013 CBA2a_1
variables: {
r:"random(45..65)"
s:"round(r/10)"
d:"round(t/15)"
t1:"round(s*random(70..100)/100)"
t2:"t1"
t:"100-r"
u1:"round(d*random(70..100)/100)"
u2: "u1"
u3:"u1"
p0: "s"
p1: "p0+t1"
p2: "p1+t2"
p3: "r-p0-p1-p2"
p4: "t-p8-p7-p6-p5"
p5: "p6+u3"
p6: "p7+u2"
p7: "p8+u1"
p8: "d"
check: "p0+p1+p2+p3+p4+p5+p6+p7+p8"
n1:"0"
n2:"1"
n3:"2"
n4:"3"
n5:"4"
n6:"5"
n7:"6"
n8:"7"
n9:"8"
ecom:"(n1*p0+n2*p1+n3*p2+n4*p3+n5*p4+n6*p5+n7*p6+n8*p7+n9*p8)/100"
probexceed:"if(ecom>3,p4+p5+p6+p7+p8,if(ecom>4,p5+p6+p7+p8,if(ecom>5,p6+p7+p8,1-p0-p1-p2)))"
strexceed:"if(ecom>3,p4/100+'+'+p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100,if(ecom>4,p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100,if(ecom>5,p6/100+'+'+p7/100+'+'+p8/100,p3/100+'+'+p4/100+'+'+p5/100+'+'+p6/100+'+'+p7/100+'+'+p8/100)))"
idef:"'an'"
organisation:"'airline'"
period:"'day'"
activity:"'luggage handling'"
episodes:"'complaints'"
}
statement: """
The probabilities that {idef} {organisation} will receive {episodes} per {period} about its {activity} are given by the following table:
<table border="3">
<tr><td>Complaints</td><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr>
<tr><td>Probability</td><td>$\var{p0/100}$</td><td>$\var{p1/100}$</td><td>$\var{p2/100}$</td><td>$\var{p3/100}$</td><td>$\var{p4/100}$</td><td>$\var{p5/100}$</td><td>$\var{p6/100}$</td><td>$\var{p7/100}$</td><td>$\var{p8/100}$</td></tr>
</table>
Answer the following two parts:
"""
parts: [
{
type: gapfill
prompt:"""
Find the expected number of {episodes} per {period}.
Answer to two decimal places
Expected number = [[0]]?
"""
gaps: [
{type: numberentry
minvalue: "{ecom-0.01}"
maxvalue: "{ecom+0.01}"
marks: 2}
]
}
]
advice: """
"""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment