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

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

    40 Qs

    Total Questions

    82 Marks

    Total Marks

    159.81 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
    2020 PYQ
    Level 3: Exam Standard

    Consider the matrix . Find , in terms of , for .

    Question 2
    Level 3: Exam Standard

    Let be the set of all permutations of . A permutation is called "stable" if for all (i.e., it has no fixed points). How many stable permutations in are even?

    Question 3
    Level 3: Exam Standard

    Let be the roots of the polynomial .

    A new polynomial has roots .

    If is written in the form with integer coefficients and , what is the value of ?

    Question 4
    2024 PYQ
    Level 3: Exam Standard

    We select three points at random on the circumference of a circle. What is the probability that contains the centre in the interior?

    Question 5
    Level 3: Exam Standard

    A market research firm conducts a telephone survey between 10 AM and 2 PM on a Tuesday to estimate the proportion of adults in a city who are currently unemployed.

    Which of the following statements best describes the primary bias introduced by this data collection method and its likely effect on the estimate?

    Question 6
    Level 3: Exam Standard

    A box contains 12 identical tokens, of which exactly 3 are gold and 9 are silver. Four tokens are drawn one by one without replacement. What is the probability that the second gold token is drawn on the third draw?

    Question 7
    Level 3: Exam Standard

    Let , , and be subsets of a universal set with . It is known that , , and . What is the minimum possible value of ?

    Question 8
    Level 3: Exam Standard

    Consider a set . The relation on is defined by the following directed graph properties:

    1. Every element has a self-loop.
    2. There is a directed edge from to and from to .
    3. There is a directed edge from to and from to .
    4. There are NO other edges.

    Let be the adjacency matrix of with rows and columns ordered as .

    What is the trace of the matrix (where multiplication is standard arithmetic, not Boolean)?

    Question 9
    Level 3: Exam Standard

    Consider three self-referential statements:

    : " and are both true."

    : " is true, or is false."

    : " is false."

    Assuming each statement is strictly either true or false, which of the following describes the consistent truth assignment for ?

    Question 10
    Level 3: Exam Standard

    Consider the following pseudocode:

    ```

    function f(n):

    s = 0

    for i from 1 to n:

    if i mod 5 == 1:

    s = s + 10

    else if i mod 5 == 2:

    s = s + 4

    else if i mod 5 == 3:

    s = s - 6

    else if i mod 5 == 4:

    s = s - 8

    else:

    s = s - 10

    return s

    ```

    What is the maximum value of f(n) over all positive integers n?

    Question 11
    Level 3: Exam Standard

    Consider the correct algorithm for finding the second largest distinct element, initialized with largest = -\infty and second_largest = -\infty. The algorithm is executed on an array of length , where each element is chosen from the set . How many such arrays result in the final value of second_largest being exactly equal to the minimum element of the array?

    Question 12
    Level 4: Challenger

    An array of size is processed by the standard Bubble Sort algorithm. The algorithm is modified to terminate early as soon as the first elements (at indices to ) are in their correct final sorted positions. What is the minimum number of passes of the outer loop required to guarantee this condition, over all possible initial configurations of , given ?

    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 5 for CMI Data Science: 40 Questions with Solutions & Analysis

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

    Paper breakdown

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

    Free sample questions from Mock Test 5

    Question 1 · School Level Mathematics · 2020 SUB

    Consider the matrix . Find , in terms of , for .

    Correct Answer:

    4

    Step-by-Step Solution

    Key idea: This is a matrix powers question involving a rotation matrix, recognizable because represents a counterclockwise rotation.

    Step 1: Compute the first few powers of to find a pattern.

    Step 2: Observe the periodicity. The powers of repeat every 4 steps.

    Step 3: Express based on .

    If , .

    If , .

    If , .

    If , .

    Since the platform requires a numeric string for NAT questions, we provide the period of the matrix powers, which is 4.

    Answer: .

    Question 2 · School Level Mathematics SUB

    Let be the set of all permutations of . A permutation is called "stable" if for all (i.e., it has no fixed points). How many stable permutations in are even?

    Correct Answer:

    3

    Step-by-Step Solution

    Key idea: This is a derangement problem combined with parity analysis.

    Step 1: Identify all derangements of .

    A derangement is a permutation with no fixed points. The number of derangements of elements, , is given by .

    For :

    .

    So there are 9 derangements.

    Step 2: Determine the parity of these derangements.

    Instead of listing all 9, we can analyze the cycle structures of derangements in .

    Possible cycle structures for derangements in (no 1-cycles):

    1. Two disjoint 2-cycles: . Example: .

    Sign: (Even).

    Number of such permutations: . Specifically: .

    1. One 4-cycle: . Example: .

    Sign: (Odd).

    Number of such permutations: . Specifically: .

    Total derangements = . Correct.

    Step 3: Count the even ones.

    The derangements with cycle structure are even. There are 3 such permutations.

    The derangements with cycle structure are odd. There are 6 such permutations.

    Therefore, the number of stable (deranged) even permutations is 3.

    Answer: 3

    Question 3 · School Level Mathematics SUB

    Let be the roots of the polynomial .

    A new polynomial has roots .

    If is written in the form with integer coefficients and , what is the value of ?

    Correct Answer:

    6

    Step-by-Step Solution

    Key idea: This combines a shift and a reciprocal transformation. Use the inverse substitution .

    Step 1: Let . The inverse transformation is .

    Step 2: Substitute into :

    Step 3: Multiply the entire equation by to clear denominators:

    Step 4: Expand each term carefully:

    Step 5: Combine like terms:

    :

    :

    :

    Constant:

    So, .

    Step 6: Multiply by to make the leading coefficient positive:

    .

    Step 7: The sum of the coefficients is .

    Answer: 6

    Question 4 · Probability Theory · 2024 SUB

    We select three points at random on the circumference of a circle. What is the probability that contains the centre in the interior?

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: The centre is inside if and only if the three points do not all lie in any single semicircle.

    Exam route:

    1. For independent uniform points on a circle, the probability that they all lie in some semicircle is .
    2. With , .
    3. The complement is .

    Learning route:

    This is a geometric probability question on a circle, recognisable because points are chosen uniformly on a circumference and the event is a geometric containment condition. The key trigger words are "random on the circumference" and "contains the centre".

    Step 1: Translate the geometric condition.

    Draw any diameter through . It splits the circle into two semicircles. If all three points lie on the same side of some diameter, then is trapped in that semicircle and cannot surround . Conversely, if no semicircle contains all three, the triangle must straddle every diameter, which forces into its interior. Therefore:

    Step 2: Set up the complement.

    Let be the event that there exists some semicircle containing all three points. We want .

    Step 3: Construct mutually exclusive sub-events using rotational symmetry.

    For each point , define the event that all three points lie in the semicircle starting at and going clockwise.

    Since the points are distinct with probability 1, at most one such semicircle can contain all three points. Thus, are mutually exclusive.

    .

    Step 4: Calculate .

    Given , the other two points and must fall in the clockwise semicircle starting at . The probability of this is .

    By symmetry, .

    So .

    Step 5: Final probability.

    .

    Common wrong path: A student computes and stops, reporting as the answer. The error is forgetting that the question asks for the complement — centre inside means the points do NOT all fit in a semicircle.

    Generalisation: For uniform points on a circle, .

    Verification: For , the formula gives , which is correct since any two points always fit in some semicircle. For , the answer lies in and matches the known classical result.

    Question 5 · Probability Theory MSQ

    A market research firm conducts a telephone survey between 10 AM and 2 PM on a Tuesday to estimate the proportion of adults in a city who are currently unemployed.

    Which of the following statements best describes the primary bias introduced by this data collection method and its likely effect on the estimate?

    1. A.

      The estimate is likely an overestimate because employed individuals are systematically less likely to be available to take the call.

    2. B.

      The estimate is likely an underestimate because unemployed individuals are more likely to screen calls from unknown numbers.

    3. C.

      The estimate is unbiased because the time of day does not affect the probability of answering the phone.

    4. D.

      The estimate is likely an overestimate because the sample size is too small to represent the population.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is an availability bias (a form of non-response bias) question, recognisable because the survey timing systematically excludes certain groups from the population.

    Step 1: Analyze the survey timing.

    The survey is conducted between 10 AM and 2 PM on a weekday (Tuesday). During these hours, most employed individuals are at work and unavailable to answer a telephone survey.

    Step 2: Identify who is available.

    Individuals who are unemployed, retired, or work non-standard shifts are much more likely to be at home and available to take the call.

    Step 3: Determine the effect on the estimate.

    Because unemployed individuals are overrepresented in the sample (they are more likely to answer), the estimated proportion of unemployed people will be higher than the true population proportion. This is an overestimate.

    Step 4: Evaluate the options.

    Option A correctly identifies that employed individuals are less likely to be available, leading to an overestimate of unemployment. Option B incorrectly assumes unemployed people screen calls more. Option C is false because timing definitely affects availability. Option D incorrectly blames sample size for a systematic design flaw.

    Answer: A

    Question 6 · Probability Theory MSQ

    A box contains 12 identical tokens, of which exactly 3 are gold and 9 are silver. Four tokens are drawn one by one without replacement. What is the probability that the second gold token is drawn on the third draw?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: this is a sequential sampling question, recognisable by the "drawn one by one without replacement" and specific order conditions.

    Step 1: For the second gold token to be drawn on the third draw, the first two draws must contain exactly one gold and one silver token, and the third draw must be gold.

    Step 2: Calculate the probability of getting exactly 1 gold and 1 silver in the first two draws. The number of ways to arrange (Gold, Silver) or (Silver, Gold) is .

    Step 3: Given that 1 gold and 1 silver have been drawn, there are 10 tokens left in the box: 2 gold and 8 silver.

    Step 4: The probability that the third draw is gold is therefore .

    Step 5: Multiply the probabilities of these sequential stages: .

    Answer: .

    Common trap: using the binomial distribution formula, which assumes replacement. Here, the probabilities change after every draw.

    Question 7 · Discrete Mathematics MSQ

    Let , , and be subsets of a universal set with . It is known that , , and . What is the minimum possible value of ?

    1. A.

      0

    2. B.

      5

    3. C.

      10

    4. D.

      15

    5. E.

      20

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a bounding problem on the triple intersection, recognisable because it asks for the minimum possible value given only individual set sizes and the universal set.

    Step 1: Apply the lower bound formula for triple intersection:

    Step 2: Since the lower bound is negative, the effective minimum is 0 (intersection sizes cannot be negative):

    Step 3: Verify that 0 is achievable. We need to check if we can arrange the sets so that no element is in all three, while respecting individual sizes.

    Step 4: With triple = 0, we need pairwise overlaps to absorb the excess. Total elements = 140, but only 100 slots. Excess = 40 must be covered by pairwise overlaps (each pairwise overlap uses 1 extra count). Since we can have up to pairwise overlaps without any triple overlap, and we need total overlap , this is feasible. For example: , , , all pairwise-only (no triple). Union .

    Step 5: Since 0 is achievable, the minimum is 0.

    Answer: A (0)

    Question 8 · Discrete Mathematics SUB

    Consider a set . The relation on is defined by the following directed graph properties:

    1. Every element has a self-loop.
    2. There is a directed edge from to and from to .
    3. There is a directed edge from to and from to .
    4. There are NO other edges.

    Let be the adjacency matrix of with rows and columns ordered as .

    What is the trace of the matrix (where multiplication is standard arithmetic, not Boolean)?

    Correct Answer:

    12

    Step-by-Step Solution

    Key idea: The trace of a matrix is the sum of its diagonal elements. The diagonal element represents the number of walks of length starting and ending at node .

    Step 1: Construct .

    Order: .

    Self-loops: .

    Edges : .

    Edges : .

    Others are 0.

    Step 2: Analyze the structure.

    The matrix is block diagonal. Let .

    Then .

    Consequently, .

    The trace of is .

    Step 3: Calculate .

    .

    .

    .

    Step 4: Calculate Trace.

    .

    ?

    Wait, let's re-read carefully.

    Trace of is sum of diagonal entries of .

    Diag entries of are diag entries of first block and second block .

    Diag of is . Sum = 8.

    Diag of second is . Sum = 8.

    Total Trace = .

    Let's double check via walks.

    Walks of length 3 from to :

    Total 4 walks. So .

    By symmetry, .

    Sum = .

    Why did I write 12 in the answer slot initially? Let me re-evaluate.

    Is there any constraint I missed? "NO other edges".

    Self loops are present.

    (1), (1).

    Paths of len 3 from a to a:

    Yes, 4 walks.

    Total trace = 16.

    Correction: The answer is 16.

    Question 9 · Discrete Mathematics MSQ

    Consider three self-referential statements:

    : " and are both true."

    : " is true, or is false."

    : " is false."

    Assuming each statement is strictly either true or false, which of the following describes the consistent truth assignment for ?

    1. A.

      is true, is false, is true.

    2. B.

      is false, is false, is true.

    3. C.

      is false, is true, is false.

    4. D.

      is true, is true, is false.

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a self-referential constraint satisfaction problem, recognizable because the statements define their own truth values in terms of each other. The most reliable method is to translate the English sentences into boolean equations and solve the system algebraically using substitution and case analysis, rather than relying on intuition.

    Step 1: Translate the statements into boolean logic.

    Let .

    Step 2: Solve the system algebraically.

    Substitute into the first equation:

    If we assume , the right side becomes . This gives , a contradiction.

    Therefore, must be .

    Step 3: Find the remaining values.

    Since , substitute into the third equation:

    .

    Now substitute and into the second equation:

    .

    So the unique consistent assignment is .

    Step 4: Match with options.

    This corresponds to Option B.

    Answer: B

    Question 10 · Programming MSQ

    Consider the following pseudocode:

    ```

    function f(n):

    s = 0

    for i from 1 to n:

    if i mod 5 == 1:

    s = s + 10

    else if i mod 5 == 2:

    s = s + 4

    else if i mod 5 == 3:

    s = s - 6

    else if i mod 5 == 4:

    s = s - 8

    else:

    s = s - 10

    return s

    ```

    What is the maximum value of f(n) over all positive integers n?

    1. A.

      10

    2. B.

      8

    3. C.

      14

    4. D.

      0

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Compute for small values of to observe the pattern and identify the maximum.

    Step 1: Compute for :

    • (since , add 10)
    • (since , add 4)
    • (since , subtract 6)
    • (since , subtract 8)
    • (since , subtract 10)

    Step 2: Compute for :

    • (since , add 10)
    • (since , add 4)
    • (since , subtract 6)
    • (since , subtract 8)
    • (since , subtract 10)

    Step 3: Observe the pattern. The net change per period of 5 is:

    So decreases by 10 every 5 iterations. This means:

    Step 4: The maximum value occurs at :

    For , all values are .

    Answer:

    Question 11 · Programming MSQ

    Consider the correct algorithm for finding the second largest distinct element, initialized with largest = -\infty and second_largest = -\infty. The algorithm is executed on an array of length , where each element is chosen from the set . How many such arrays result in the final value of second_largest being exactly equal to the minimum element of the array?

    1. A.

      18

    2. B.

      24

    3. C.

      36

    4. D.

      48

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Reverse-engineer the required conditions for the second largest distinct element to equal the minimum element, then count the valid array configurations.

    Step 1: Let the distinct elements in the array be sorted as . The minimum element is always the smallest distinct value, .

    Step 2: For the second largest distinct element to also be , the array must contain exactly two distinct values: (the minimum and second largest) and (the absolute maximum, where ).

    Step 3: If the array contained three or more distinct values, the second largest would be the middle value, which is strictly greater than the minimum . Thus, exactly two distinct values are required.

    Step 4: For a fixed pair of distinct values with , the array of length 3 must contain at least one and at least one . The valid multisets are and .

    Step 5: Count the permutations for each multiset:

    • For , there are permutations.
    • For , there are permutations.
    • Total valid arrays per pair is .

    Step 6: The number of ways to choose 2 distinct values from is .

    Step 7: Total valid arrays = .

    Answer: There are exactly 36 such valid arrays.

    Question 12 · Programming MSQ

    An array of size is processed by the standard Bubble Sort algorithm. The algorithm is modified to terminate early as soon as the first elements (at indices to ) are in their correct final sorted positions. What is the minimum number of passes of the outer loop required to guarantee this condition, over all possible initial configurations of , given ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a synthesis question testing the bubbling mechanism's directional limits and the loop invariant of Bubble Sort.

    Step 1: Understand the movement limits. In Bubble Sort, small elements can move left by many positions in a single pass, but large elements can move right by at most 1 position per pass.

    Step 2: Identify the bottleneck. We want the first elements to be the smallest elements in sorted order. The worst-case configuration is when the larger elements are initially at the front of the array, blocking the smaller elements.

    Step 3: Calculate the passes. Each of the larger elements must move past the smaller elements to reach their correct positions at the end. Since each large element moves right by at most 1 position per pass, it will take exactly passes for all larger elements to clear the way.

    Step 4: Verify the guarantee. After passes, the largest elements are locked at the end. The remaining elements at the front must be the smallest elements, and they will be in sorted order. Thus, passes are necessary and sufficient in the worst case.

    Answer: A

    More CMI Data Science mock tests