{ name: Maths Sample Questions duration: 0 percentPass: 50 shuffleQuestions: false navigation: { reverse: true browse: true } timing: { timeout: { action: warn message: "You have run out of time. The exam is now over." } timedwarning: { action: warn message: "**Uh oh!**" } } feedback: { showtotalmark: true showanswerstate: true showactualmark: true allowrevealanswer: true advice: {type: onreveal, threshold: 50} } questions: [ { name: PDFs and CDFs statement: "Suppose $X$ is a continuous uniform random variable defined on $[\var{a},\var{b}]$." variables: { a: random(-5..5) b: a+random(3..6) c: random(a+1..b-1) } parts: [ { type: GapFill prompt: """ What is the PDF of $X$? |/3. $f_X(x) = \left \{ \begin{array}{l} \phantom{{.}} \\ \phantom{{.}} \\ \phantom{{.}} \end{array} \right .$|<. [[0]]$,$ | $\var{a} \leq x \leq \var{b},$ | ||| |<. [[1]]$,$|$\textrm{otherwise.}$| """ gaps: [ { type: jme, answer: "1/{b-a}", marks: 1 } { type: jme, answer: "0", marks: 1 } ] } { type: GapFill prompt: """ Compute the CDF of $X$. |/5. $F_X(x) = \left \{ \begin{array}{l} \phantom{{.}} \\ \phantom{{.}} \\ \phantom{{.}} \\ \phantom{{.}} \\ \phantom{{.}} \\ \phantom{{.}} \end{array} \right .$ |<. [[0]] | $x \lt \var{a},$ | ||| |<. [[1]]| $\var{a} \leq x \leq \var{b},$ | ||| |<. [[2]]| $x \gt \var{b}.$ | """ gaps: [ { type: jme, answer: 0, marks: 1 } { type: jme, answer: "(x-{a})/{b-a}", marks: 1 } { type: jme, answer: 1, marks: 1 } ] } { type: GapFill prompt: """ Calculate: $P(X \geq \var{c}) = \phantom{{}}$[[0]] """ gaps: [ { type: jme, answer: "{b-c}/{b-a}", marks: 1 } ] } ] advice: """ h4. a) The PDF is given by \[f_X(x) = \begin{cases} \simplify{1/({b-a})} & \var{a} \leq x \leq \var{b}, \\ \\ 0 & \textrm{otherwise}. \end{cases} \]