CMI Data Science
    Mock Tests
    Verified Solutions Included
    Mock Test 8 for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Mock Test 8 for CMI Data Science: 40 exam-level questions, detailed solutions and performance analysis. First questions free.

    40 Qs

    Total Questions

    84 Marks

    Total Marks

    143.36 Mins

    Duration

    +3 / -1 / 0

    Marking Scheme

    Section-wise Paper Structure

    School Level Mathematics

    17 Qs

    43% of total marks

    Probability Theory

    10 Qs

    25% of total marks

    Discrete Mathematics

    10 Qs

    25% of total marks

    Programming

    3 Qs

    8% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2022 PYQ
    Level 3: Exam Standard
    Which of the following plots correspond to a bijective function?
    101101101101(i)(ii)(iii)(iv)
    Question 2
    Level 3: Exam Standard

    Let and be positive real numbers satisfying . What is the minimum possible value of

    Question 3
    Level 3: Exam Standard

    The sum of all integer solutions to the inequality

    is

    Question 4
    2023 PYQ
    Level 3: Exam Standard
    Two friends and are playing a coin flipping game with a fair coin, based on the following rules:
    • When flips the coin
    – If it is heads then wins and the game ends.
    – If it is tails then gets to flip the coin.
    • When flips the coin
    – If it is heads then wins and the game ends.
    – If it is tails then gets to flip the coin.
    • The flipping continues till someone gets heads.
    Suppose is the first player to flip the coin. What is the probability that will win the game.
    Question 5
    2025 PYQ
    Level 3: Exam Standard
    There are 18 chocolates in a bag, of which 7 are green, 6 are blue, and 5 are red. We pick chocolates one at a time from the bag without replacement.
    (a) What is the probability that the first and the third chocolate are green?
    (b) What is the probability that after picking twelve chocolates, only chocolates of one colour remain in the bag?
    Question 6
    2022 PYQ
    Level 3: Exam Standard
    Common Description: Description for the next two questions
    The probability density function of a normal distribution with mean and variance is of the form Let be a random variable with mean and variance . Let be independently sampled values of , and let be the sample mean. The central limit theorem states that if the sample size is large enough, then approximately follows the normal distribution with mean and variance . That is, . This in turn implies that Let be a random variable that follows the normal distribution with mean 0 and variance 1. For any real number let be the probability that takes values smaller than . Then For solving the next two problems you may assume the following approximations: .
    The weekly number of sales at a certain car dealership is known to follow a probability distribution with mean and variance . A performance audit picks a random sample of 36 weekly sales figures from the last two years. They find that the sample mean is 10 and the sample variance is 144. Use this information to answer the next two questions. You may assume that is a large enough sample size. Check if the following statement(s) are correct. Briefly explain your reasons.
    (a) The probability that the average number of sales in a week will be more than 8 but less than 14 is (b) The probability that a salesperson would be able to sell, on an average, ten or more products in a week is 50%.
    Question 7
    2020 PYQ
    Level 3: Exam Standard

    Let R be the set of all binary relations on the set . Suppose a relation is chosen from R at random. What is the probability that the chosen relation is symmetric?

    Question 8
    Level 3: Exam Standard

    Consider the following transformation rules on binary strings:

    • Replace any occurrence of "11" with "0"
    • Replace any occurrence of "00" with "1"
    • Replace any "0" with "11"
    • Replace any "1" with "00"

    Two strings are in the same equivalence class if one can be transformed into the other using these rules.

    How many distinct equivalence classes contain at least one string of length exactly 4?

    Enter your answer as a single integer.

    Question 9
    Level 3: Exam Standard

    You encounter two inhabitants, and , on an island of Knights (always tell the truth) and Knaves (always lie).

    • says to : "If I were to ask you whether you are a Knight, you would say 'yes'."
    • says to : "If I were to ask you whether you are a Knave, you would say 'yes'."

    Which of the following is correct?

    Question 10
    2021 PYQ
    Level 3: Exam Standard
    Consider the following code, in which A is an array indexed from 0. function foo(A,n) { x = 0; for i = 0 to n-1 { x = A[i]^x; } return(x); } Here, ^ represents the bitwise Exclusive OR function over variables and .
    Given integers and , we write them in binary, padded by zeros to the left to make them of equal length. We then apply Exclusive OR to these binary representations bitwise. The operation ^ denotes the integer value obtained by performing bitwise Exclusive OR on the binary values of and . For example, ^4 = 011^, and ^5 = 1001^. The truth table for the Exclusive OR function is provided below.
    aba^b000011101110
    If , what will foo(A,5) return?
    Question 11
    Level 3: Exam Standard

    Let denote the sum of the digits of a positive integer . Which of the following equations has NO solution for a 2-digit integer ?

    Question 12
    Level 4: Challenger

    Let be a 2-digit positive integer. Define the following functions:

    • : the integer formed by reversing the base-10 digits of .
    • : the integer formed by interpreting the base-2 representation of as a base-10 number.
    • : the sum of the base-10 digits of .
    • : the sum of the base-2 digits of .
    • : the number of base-2 digits of .

    Which of the following equations has NO solution for any 2-digit integer ?

    Unlock All 40 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More CMI Data Science Mock Tests

    Free preview ends here

    Login to view the complete test and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Mock Test 8 for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Mock Test 8 for CMI Data Science: 40 exam-level questions, detailed solutions and performance analysis. First questions free.

    Paper breakdown

    40 questions · 84 marks · 143.36 minutes. School Level Mathematics: 17 · Probability Theory: 10 · Discrete Mathematics: 10 · Programming: 3

    Free sample questions from Mock Test 8

    Question 1 · School Level Mathematics · 2022 MSQ
    Which of the following plots correspond to a bijective function?
    101101101101(i)(ii)(iii)(iv)
    1. A.

      (i) and (ii)

    2. B.

      (ii) and (iii)

    3. C.

      (i) and (iv)

    4. D.

      (iii) and (iv)

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Key idea: A function is bijective if and only if it is both one-one (injective) and onto (surjective). Graphically, this means it must pass both the Vertical Line Test (for being a function) and the Horizontal Line Test (for being one-one and onto the given codomain).

    Step 1: Analyze Plot (i). The graph is a straight line segment with strictly decreasing y-values as x increases. It passes the Vertical Line Test (it is a function) and the Horizontal Line Test (it is one-one). Since it spans the full y-range from 0 to 1, it is onto. Thus, it is bijective.

    Step 2: Analyze Plot (ii). The curve bends back on itself (x decreases then increases). A vertical line can intersect it at more than one point. It fails the Vertical Line Test, so it is not a function.

    Step 3: Analyze Plot (iii). The graph is a piecewise linear curve that goes up and down. A horizontal line (e.g., y = 0.5) would intersect it at multiple points. It fails the Horizontal Line Test, so it is not one-one, hence not bijective.

    Step 4: Analyze Plot (iv). The graph is a smooth curve where x strictly increases and y strictly decreases (in standard math coordinates). It passes both the Vertical Line Test and the Horizontal Line Test, and spans the full codomain. Thus, it is bijective.

    Answer: C

    Question 2 · School Level Mathematics SUB

    Let and be positive real numbers satisfying . What is the minimum possible value of

    Correct Answer:

    1

    Step-by-Step Solution

    Key idea: This is a constrained optimization by single-variable reduction question, recognisable because we have an expression in two variables tied together by a linear constraint. We eliminate one variable and minimise a single-variable function.

    Step 1: Use the constraint to reduce to one variable.

    From : , where .

    Define for .

    Step 2: Find critical points.

    .

    Set :

    (taking positive square roots since and )

    .

    Step 3: Verify it is a minimum.

    .

    For : both terms are positive, so .

    Therefore gives a local minimum. Since as or , this is the global minimum.

    Step 4: Compute the minimum value.

    .

    Common trap: Students who take the square root of and write might consider the negative branch , giving , which is outside the domain. Only the positive branch is valid.

    Answer: 1

    Question 3 · School Level Mathematics SUB

    The sum of all integer solutions to the inequality

    is

    Correct Answer:

    5

    Step-by-Step Solution

    Key idea: This is a radical inequality that requires careful casework based on the sign of the right side and domain restrictions.

    Step 1: Determine the domain:

    For to be defined: , so .

    Step 2: Case 1 — When :

    If , then the right side is negative: .

    Since always, we have .

    So the inequality holds for all in the domain with .

    Domain restriction: .

    So .

    Integer solutions in this range: .

    Step 3: Case 2 — When :

    Both sides are non-negative, so we can square both sides:

    Step 4: Factor the quadratic:

    This holds when .

    Step 5: Combine with :

    .

    Integer solutions: .

    Step 6: Verify each integer solution:

    • : . ✓
    • : . ✓
    • : . ✓
    • : . ✓
    • : . ✓
    • : . ✗ (not strictly greater)

    Step 7: Sum all integer solutions:

    Answer: The sum is 5.

    Question 4 · Probability Theory · 2023 SUB
    Two friends and are playing a coin flipping game with a fair coin, based on the following rules:
    • When flips the coin
    – If it is heads then wins and the game ends.
    – If it is tails then gets to flip the coin.
    • When flips the coin
    – If it is heads then wins and the game ends.
    – If it is tails then gets to flip the coin.
    • The flipping continues till someone gets heads.
    Suppose is the first player to flip the coin. What is the probability that will win the game.
    Correct Answer:

    none

    Step-by-Step Solution

    Insight: This is a classic infinite alternating-turn game. The key is recognizing that after one full round of failures (A fails, B fails), the game resets to the exact same state.

    Exam route:

    Let .

    A wins immediately on the first flip with probability .

    If A flips tails (probability ), B gets a turn. At this point, the game state is identical to the start, but with B as the first player. So , meaning .

    Setting up the recursion:

    .

    Alternative route (geometric series):

    A wins on turn 1 (prob ), or turn 3 (prob ), or turn 5 (prob ), etc.

    .

    Learning route:

    Both recursive and series formulations yield the same result. The recursive approach is faster under exam pressure. The key insight is that the game is memoryless: after any double-failure, the state is identical to the start.

    Question 5 · Probability Theory · 2025 SUB
    There are 18 chocolates in a bag, of which 7 are green, 6 are blue, and 5 are red. We pick chocolates one at a time from the bag without replacement.
    (a) What is the probability that the first and the third chocolate are green?
    (b) What is the probability that after picking twelve chocolates, only chocolates of one colour remain in the bag?
    Correct Answer:

    none

    Step-by-Step Solution

    Insight: For specific positions with unspecified middle draws, symmetry allows ignoring the middle; for "remaining" items, count the leftover subset instead of the drawn sequence.

    Exam route: (a) . Given 1st G, 17 remain and 6 are G, so . Product = . (b) Total ways to leave 6 is . Favourable monochromatic leftovers: . Probability = .

    Learning route: This is a without-replacement question with unspecified middle draws and a "remaining items" part. The symmetry method applies because the 2nd draw is unconstrained, so the 3rd draw is just a random position among the remaining items after the 1st. For part (b), counting the leftover subset is simpler than tracking 12 ordered draws.

    Step 1: For part (a), the first chocolate must be green: .

    Step 2: After one green is removed, 17 remain and 6 are green. The third draw is one random position among these 17, so .

    Step 3: The second draw is unrestricted, so it does not need to be split into cases. Multiply: .

    Step 4: For part (b), after 12 draws, 6 remain. It is easier to count the remaining 6-subset than the ordered sequence of 12 draws.

    Step 5: Total ways to choose the 6 remaining chocolates is .

    Step 6: The remaining 6 must be all one colour. The only possibilities are 6 blue (from the 6 available) or 6 green (from the 7 available). Red cannot have 6 remaining since there are only 5.

    Step 7: Favourable outcomes = .

    Step 8: Probability = .

    Question 6 · Probability Theory · 2022 SUB
    Common Description: Description for the next two questions
    The probability density function of a normal distribution with mean and variance is of the form Let be a random variable with mean and variance . Let be independently sampled values of , and let be the sample mean. The central limit theorem states that if the sample size is large enough, then approximately follows the normal distribution with mean and variance . That is, . This in turn implies that Let be a random variable that follows the normal distribution with mean 0 and variance 1. For any real number let be the probability that takes values smaller than . Then For solving the next two problems you may assume the following approximations: .
    The weekly number of sales at a certain car dealership is known to follow a probability distribution with mean and variance . A performance audit picks a random sample of 36 weekly sales figures from the last two years. They find that the sample mean is 10 and the sample variance is 144. Use this information to answer the next two questions. You may assume that is a large enough sample size. Check if the following statement(s) are correct. Briefly explain your reasons.
    (a) The probability that the average number of sales in a week will be more than 8 but less than 14 is (b) The probability that a salesperson would be able to sell, on an average, ten or more products in a week is 50%.
    Correct Answer:

    1

    Step-by-Step Solution

    Key idea: This is a conceptual question testing whether you can distinguish the distribution of a single observation from the distribution of the sample mean, recognisable because it asks you to verify probability statements about "the average."

    Step 1: Recall the setup.

    Population mean , variance , so .

    Sample size . By CLT, .

    The standard deviation of is .

    Step 2: Evaluate statement (a).

    Statement (a) gives the integral:

    This is the density of a normal distribution with mean and standard deviation .

    But is the standard deviation of a <b>single</b> observation , not of the sample mean .

    The correct density for uses standard deviation , not .

    Therefore statement (a) is <b>incorrect</b>.

    Step 3: Evaluate statement (b).

    Statement (b) says: the probability of selling, on average, ten or more products is 50%.

    This means .

    Since , the distribution is symmetric about its mean .

    Therefore statement (b) is <b>correct</b>.

    Only statement (b) is correct, so exactly 1 statement is correct.

    Common trap: accepting statement (a) because the mean and bounds look plausible. Always check whether the standard deviation in the density matches the standard error , not the population .

    Answer: 1 (only statement (b) is correct).

    Question 7 · Discrete Mathematics · 2020 SUB

    Let R be the set of all binary relations on the set . Suppose a relation is chosen from R at random. What is the probability that the chosen relation is symmetric?

    Correct Answer:

    0.125

    Step-by-Step Solution

    Key idea: This is a Counting Symmetric Relations problem. Recognise it by "probability that a random relation is symmetric" on a finite set.

    Step 1: Total number of binary relations on set of size .

    A relation on is a subset of .

    .

    Total relations = .

    Step 2: Count symmetric relations.

    A relation is symmetric iff .

    This constrains off-diagonal pairs to be chosen TOGETHER.

    Partition the 9 positions in :

    • Diagonal: — 3 positions. Each can be independently included or not. choices.
    • Off-diagonal pairs: — 3 pairs. Each pair must be both in or both out. choices.

    Total symmetric relations = .

    Step 3: Compute probability.

    .

    General formula: For set of size , probability = .

    Here : .

    Answer: 0.125

    Question 8 · Discrete Mathematics SUB

    Consider the following transformation rules on binary strings:

    • Replace any occurrence of "11" with "0"
    • Replace any occurrence of "00" with "1"
    • Replace any "0" with "11"
    • Replace any "1" with "00"

    Two strings are in the same equivalence class if one can be transformed into the other using these rules.

    How many distinct equivalence classes contain at least one string of length exactly 4?

    Enter your answer as a single integer.

    Correct Answer:

    3

    Step-by-Step Solution

    Key idea: This is a counting problem based on the modular invariant. We need to find how many distinct values of the invariant can be achieved by strings of length 4.

    Step 1: Recall the invariant

    From the previous analysis, the invariant is . This invariant completely determines the equivalence class.

    Step 2: Express in terms of for length 4

    For a string of length 4, .

    Substitute into :

    .

    Step 3: Check all possible values of

    Since the length is 4, can be .

    Step 4: Count distinct classes

    The possible values of are . All three possible residue classes modulo 3 are represented.

    Therefore, there are exactly 3 distinct equivalence classes that contain a string of length 4.

    Answer: 3

    Common trap: Students might try to list all 16 strings of length 4 and manually group them, which is time-consuming and error-prone. Using the invariant makes it a simple algebraic check.

    Question 9 · Discrete Mathematics MSQ

    You encounter two inhabitants, and , on an island of Knights (always tell the truth) and Knaves (always lie).

    • says to : "If I were to ask you whether you are a Knight, you would say 'yes'."
    • says to : "If I were to ask you whether you are a Knave, you would say 'yes'."

    Which of the following is correct?

    1. A.

      is a Knight and is a Knight.

    2. B.

      is a Knave and is a Knave.

    3. C.

      is a Knight and is a Knave.

    4. D.

      is a Knave and is a Knight.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a meta-statement puzzle involving counterfactuals ("If I asked you..."). The key is to determine what a person would actually say when asked a direct question, and then translate that into a logical equivalence.

    Step 1: Analyze what a person would say when asked a question .

    • If is a Knight, tells the truth, so says 'yes' iff is true.
    • If is a Knave, lies, so says 'yes' iff is false.

    In both cases, says 'yes' iff .

    Step 2: Translate 's statement.

    says to : "If I asked you whether you are a Knight, you would say 'yes'."

    Here, the listener is , and the question is "Are you a Knight?" (which is equivalent to ).

    The statement "You would say 'yes'" is logically equivalent to .

    Since is a tautology (always true), is making a TRUE statement.

    Therefore, must be a Knight.

    Step 3: Translate 's statement.

    says to : "If I asked you whether you are a Knave, you would say 'yes'."

    Here, the listener is , and the question is "Are you a Knave?" (which is equivalent to ).

    The statement "You would say 'yes'" is logically equivalent to .

    Since is a contradiction (always false), is making a FALSE statement.

    Therefore, must be a Knave.

    Step 4: Verify the assignment.

    is Knight, is Knave.

    • 's claim: If asked "Are you a Knight?", (Knave) would lie and say 'yes'. says would say 'yes', which is true. Consistent.
    • 's claim: If asked "Are you a Knave?", (Knight) would tell the truth and say 'no'. says would say 'yes', which is false. Consistent.

    Answer: is a Knight and is a Knave.

    Question 10 · Programming · 2021 MSQ
    Consider the following code, in which A is an array indexed from 0. function foo(A,n) { x = 0; for i = 0 to n-1 { x = A[i]^x; } return(x); } Here, ^ represents the bitwise Exclusive OR function over variables and .
    Given integers and , we write them in binary, padded by zeros to the left to make them of equal length. We then apply Exclusive OR to these binary representations bitwise. The operation ^ denotes the integer value obtained by performing bitwise Exclusive OR on the binary values of and . For example, ^4 = 011^, and ^5 = 1001^. The truth table for the Exclusive OR function is provided below.
    aba^b000011101110
    If , what will foo(A,5) return?
    1. A.

      0

    2. B.

      2

    3. C.

      3

    4. D.

      7

    Correct Answer:

    ["D"]

    Step-by-Step Solution

    Insight: The code computes the cumulative XOR sum of all array elements, where pairs of identical numbers cancel out to 0.

    Exam route: Group identical elements using commutativity: .

    Learning route:

    Step 1: Recall the properties of the XOR operation. It is commutative () and associative ().

    Step 2: Crucially, any number XORed with itself is 0 (), and any number XORed with 0 is itself ().

    Step 3: The array is . The function computes .

    Step 4: Rearrange the terms using commutativity: .

    Step 5: Simplify using the cancellation property: .

    Answer: The function returns 7, which corresponds to option D.

    Question 11 · Programming MSQ

    Let denote the sum of the digits of a positive integer . Which of the following equations has NO solution for a 2-digit integer ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Model the 2-digit number algebraically to find a simplified expression for , revealing a strict divisibility constraint.

    Step 1: Let the 2-digit number be , where and .

    Step 2: The sum of the digits is .

    Step 3: Substitute these into the expression :

    Step 4: Simplify the expression:

    .

    Step 5: Analyze the result. The difference between any 2-digit number and its digit sum is always exactly , which means it must be a multiple of 9.

    Step 6: Check the options for multiples of 9:

    • 18 is (valid, e.g., , any , such as ).
    • 27 is (valid, e.g., , any , such as ).
    • 35 is NOT a multiple of 9 (). Thus, no integer can satisfy .
    • 72 is (valid, e.g., , any , such as ).

    Answer:

    Question 12 · Programming MSQ

    Let be a 2-digit positive integer. Define the following functions:

    • : the integer formed by reversing the base-10 digits of .
    • : the integer formed by interpreting the base-2 representation of as a base-10 number.
    • : the sum of the base-10 digits of .
    • : the sum of the base-2 digits of .
    • : the number of base-2 digits of .

    Which of the following equations has NO solution for any 2-digit integer ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Compare the magnitude bounds and parity constraints of the base-10 reversed integer and the base-2 visual integer to identify a strict impossibility.

    Step 1: Analyze the domain. is a 2-digit integer, so .

    Step 2: Evaluate Option A: .

    For , . The binary representation of 13 is , which has digits. This equation has a solution.

    Step 3: Evaluate Option B: .

    For , . The binary representation of 77 is (), which has digits. Since , this equation has a solution.

    Step 4: Evaluate Option D: .

    For , . The binary representation of 20 is (). The sum of its bits is . This equation has a solution.

    Step 5: Evaluate Option C: .

    The value is simply the last digit of the base-10 interpretation of the binary string, which is exactly the least significant bit of (i.e., ). Thus, .

    For the equation to hold, we must have .

    • is impossible for any 2-digit number.
    • requires to end in 0 (i.e., ).

    However, all such numbers are even, meaning their least significant bit is 0. Thus, for these , .

    This creates a contradiction: we need to match , but it is always 0.

    Therefore, this equation has no solution.

    Answer:

    More CMI Data Science mock tests