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

    Attempt the Mock Test 9 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
    Level 3: Exam Standard

    Let and .

    Define the operation on by (note the reverse order).

    What is the value of ?

    Question 2
    Level 3: Exam Standard

    Let , where is a real constant.

    The set of all values of for which the curve has exactly two distinct inflection points is of the form .

    Find the value of .

    Question 3
    Level 4: Challenger

    Let be a polynomial of degree 5 with real coefficients. Suppose has exactly three distinct real roots, and has exactly three distinct real roots. Which of the following statements MUST be true?

    Question 4
    Level 3: Exam Standard

    Let and be independent random variables, each uniformly distributed on . Define . Find . Express your answer as a decimal rounded to three decimal places.

    Question 5
    Level 3: Exam Standard

    Let , , and be events in a sample space such that they are pairwise independent, , and . If , find the value of .

    Question 6
    Level 3: Exam Standard

    Let be a continuous random variable with probability density function

    where is the normalizing constant. If the median of is exactly , find the value of .

    Question 7
    2024 PYQ
    Level 3: Exam Standard

    A supplier of art material has four reams of handmade paper, three boxes of acrylic colors and two printing blocks. The two artists in the shop want to buy one item each, but insist on having the same kind of art material. How many items does the supplier have to take out to be sure that the artists’ demand is met?

    Question 8
    2024 PYQ
    Level 3: Exam Standard

    There are 7 elevators in a large shopping mall, each stopping at ground floor and at most six other floors. If at least 3 elevators stop at each floor and if it is possible to go from any floor to any other floor without changing elevators, what is the maximum number of floors in the mall?

    Question 9
    Level 3: Exam Standard

    In a survey of 90 people about two brands and , the following is known:

    • The number who like brand is 4 times the number who like both brands.
    • The number who like brand is 3 times the number who like both brands.
    • Exactly 18 people like neither brand.

    How many people like exactly one brand?

    Question 10
    Level 3: Exam Standard

    Consider the standard correct algorithm for finding the closest value to a target in an array , initialized with min_diff = \infty and closest_val = null. The algorithm uses a strict inequality (current_diff < min_diff) to update the trackers. Let be an array defined by . If the target is , what is the final value of closest_val?

    Question 11
    Level 3: Exam Standard

    Consider the following three modified bubble sort algorithms applied to the array .

    Algorithm X: Standard ascending bubble sort. Returns the final value of A[n-1].

    Algorithm Y: Standard ascending bubble sort. Returns the final value of A[1].

    Algorithm Z: Ascending bubble sort, but the inner loop runs for j from 0 to n-3 for all passes. Returns the total number of swaps performed.

    Match the algorithms in List I with their returned values in List II.

    List I

    1. Algorithm X
    2. Algorithm Y
    3. Algorithm Z

    List II

    P. 1

    Q. 2

    R. 4

    Question 12
    Level 4: Challenger

    Consider the following statements regarding the space complexity and bitwise properties of XOR accumulators:

    Statement I: A 32-bit accumulator requires 32 bytes of auxiliary space.

    Statement II: If the array elements are 64-bit integers, a 32-bit accumulator processing only the lowest 32 bits will yield the exact lowest 32 bits of the true 64-bit XOR sum.

    Statement III: An 8-bit accumulator requires 1 byte of auxiliary space, and a 16-bit accumulator requires 2 bytes.

    Which of the statements given above are true?

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

    Attempt the Mock Test 9 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 9

    Question 1 · School Level Mathematics SUB

    Let and .

    Define the operation on by (note the reverse order).

    What is the value of ?

    Correct Answer:

    -1

    Step-by-Step Solution

    Key idea: This tests the definition of composition order and the multiplicative property of the sign function.

    Step 1: Understand the operation.

    . This means we apply first, then .

    Step 2: Use the property of the sign function.

    .

    We do not need to compute the resulting permutation explicitly if we can find the signs of and individually.

    Step 3: Find .

    in one-line notation.

    Inversions in :

    • Pairs from : . (2 inversions)
    • Pairs involving 5, 4: . (1 inversion)
    • Check cross terms: ; ; . No inversions.

    Total inversions for .

    .

    Alternatively, look at cycles: .

    Sign = .

    Step 4: Find .

    in one-line notation.

    Inversions in :

    • is an inversion.
    • is an inversion.

    Total inversions for .

    .

    Alternatively, cycles: .

    Sign = .

    Step 5: Calculate .

    .

    Answer: -1

    Question 2 · School Level Mathematics SUB

    Let , where is a real constant.

    The set of all values of for which the curve has exactly two distinct inflection points is of the form .

    Find the value of .

    Correct Answer:

    0

    Step-by-Step Solution

    Key idea: This is a Parameter Analysis question for inflection points. It requires determining when the second derivative has two distinct real roots and changes sign at both.

    Step 1: Compute derivatives.

    Step 2: Analyze roots of .

    For inflection points, must change sign. Since is a quadratic polynomial, it changes sign at a root if and only if the root is simple (multiplicity 1). Thus, we need two distinct real roots for .

    Step 3: Apply discriminant condition.

    Discriminant .

    For two distinct real roots, we require :

    Step 4: Verify sign change.

    Since the leading coefficient is positive and roots are distinct, the quadratic necessarily changes sign at both roots. No further checking is needed for polynomials with simple roots.

    Step 5: Identify and .

    The set is . Comparing with , we have and .

    Step 6: Calculate sum.

    Answer: 0

    Question 3 · School Level Mathematics MSQ

    Let be a polynomial of degree 5 with real coefficients. Suppose has exactly three distinct real roots, and has exactly three distinct real roots. Which of the following statements MUST be true?

    1. A.

      has exactly three distinct real roots.

    2. B.

      All roots of lie strictly between the smallest and largest roots of .

    3. C.

      has exactly four distinct real roots.

    4. D.

      has exactly five distinct real roots.

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a polynomial roots and Rolle's theorem synthesis question. We must analyze the interlacing of roots across successive derivatives.

    Step 1: Let the three distinct real roots of be .

    Step 2: Apply Rolle's Theorem to . Between and , there is at least one root of . Between and , there is at least one root of . Call these and with .

    Step 3: Analyze . Since is degree 5, is degree 4. It has at least 2 real roots. It can have 2 or 4 distinct real roots.

    Step 4: Analyze . We are told has exactly 3 distinct real roots . Since is a cubic, these are all its roots.

    Step 5: Apply Rolle's Theorem to . Between any two distinct real roots of , there is a root of .

    Case A: has exactly 2 distinct real roots . Then has at least one root in . Since is cubic with 3 real roots and has only 2 real roots (meaning does not cross the axis outside ), all three roots of must lie in . Thus .

    Case B: has 4 distinct real roots. By Rolle's Theorem, has a root between each adjacent pair, giving exactly 3 roots of between the smallest and largest roots of . Since the roots of lie in , so do the roots of .

    Step 6: In both cases, . Option B is always true.

    Options A and C are not necessarily true since can have 2 or 4 real roots. Option D contradicts the given information.

    Answer: Option B.

    Question 4 · Probability Theory SUB

    Let and be independent random variables, each uniformly distributed on . Define . Find . Express your answer as a decimal rounded to three decimal places.

    Correct Answer:

    1.944

    Step-by-Step Solution

    Key idea: This is a function of two independent RVs question. The expression simplifies to , the absolute difference.

    Step 1: Find the PMF of . Since , we have .

    For : , so .

    For where : We need . This means either or .

    • : can be , giving pairs.
    • : Similarly, pairs.
    • Total: pairs.

    So for .

    Step 2: Compute using LOTUS.

    Step 3: Convert to decimal.

    Answer:

    Question 5 · Probability Theory SUB

    Let , , and be events in a sample space such that they are pairwise independent, , and . If , find the value of .

    Correct Answer:

    0.5

    Step-by-Step Solution

    Key idea: this is an inclusion-exclusion question combined with the definition of pairwise independence. The conditions allow us to express the probability of the union entirely in terms of .

    Step 1: recall the inclusion-exclusion formula for three events:

    .

    Step 2: use the given conditions to simplify the formula.

    Since , the sum of the singles is .

    Since the events are pairwise independent, . Similarly, and . The sum of the pairs is .

    We are given .

    Step 3: substitute these into the formula:

    .

    Step 4: set this equal to the given probability of the union and solve for :

    .

    Divide by 3: .

    Multiply by 4: .

    Factor the quadratic: .

    Therefore, .

    Answer: 0.5

    Question 6 · Probability Theory SUB

    Let be a continuous random variable with probability density function

    where is the normalizing constant. If the median of is exactly , find the value of .

    Correct Answer:

    2

    Step-by-Step Solution

    Key idea: This is a reverse-engineering question. Instead of finding a probability from a known PDF, you are given a property of the distribution (the median) and must find the unknown parameter of the support.

    Step 1: Express the normalizing constant in terms of .

    Step 2: Use the definition of the median.

    The median satisfies . Here, .

    Step 3: Substitute and solve for .

    Step 4: Isolate .

    Answer: 2

    Question 7 · Discrete Mathematics · 2024 SUB

    A supplier of art material has four reams of handmade paper, three boxes of acrylic colors and two printing blocks. The two artists in the shop want to buy one item each, but insist on having the same kind of art material. How many items does the supplier have to take out to be sure that the artists’ demand is met?

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: "To be sure" signals a worst-case Pigeonhole guarantee — count categories (holes), not stock quantities.

    Exam route:

    • Holes = 3 distinct kinds of material (paper, colors, blocks).
    • Goal = 2 of the same kind ().
    • Worst case = draw from each category = 3 items.
    • Next draw forces a match: .

    Learning route:

    1. This is a worst-case guarantee question, recognisable because the phrases "to be sure" and "insist on having the same kind" demand absolute certainty, not probability.
    2. The tool is the Generalized Pigeonhole Principle in guarantee form: to guarantee items in one hole, you need items, where is the number of holes.
    3. Step-by-step:
    • Identify holes: The distinct categories are handmade paper, acrylic colors, and printing blocks. So . The numbers 4, 3, and 2 are inventory levels — they only ensure you do not exhaust a category during the worst-case draw. They are not the number of holes.
    • Set the target: Both artists want the same kind, so .
    • Build the worst case: Maximum bad luck means drawing exactly item from every category without completing a pair. That uses items.
    • Add one: The very next item drawn must duplicate one of the three kinds already drawn. Total = .
    1. Tempting wrong path: A student might add the stock quantities , assuming they need to draw all items to be safe. Another wrong path is treating the stock levels as the number of holes. The exact quantities are distractors; only the number of categories matters.

    Verification: If we draw 4 items, by PHP, at least items must be of the same kind. If we draw 3, we could have 1 of each, failing the condition. Thus, 4 is the minimum.

    Question 8 · Discrete Mathematics · 2024 SUB

    There are 7 elevators in a large shopping mall, each stopping at ground floor and at most six other floors. If at least 3 elevators stop at each floor and if it is possible to go from any floor to any other floor without changing elevators, what is the maximum number of floors in the mall?

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: Incidence double counting with a hub node — the ground floor is served by every elevator but does not consume the "six other floors" capacity.

    Defect: The phrase "without changing elevators" is a known typo in this PYQ for "by changing elevators" (i.e., the network is connected); taken literally, it would imply a single elevator covers all floors, capping the answer at 7. We proceed with the standard incidence double counting interpretation.

    Exam route:

    • Let = number of upper floors. Total floors = .
    • Connector side: elevators, each with capacity upper floors. Max incidences = .
    • Element side: upper floors, each in elevators. Min incidences = .
    • Inequality: .
    • Total floors = .

    Learning route:

    1. This is an incidence double counting question, recognisable by connectors (elevators) with a capacity cap, nodes (floors) with a minimum degree, and a request for the maximum node count.
    2. The method works because every (elevator, upper-floor) pair is an incidence, and we can bound the total from above (elevator side) and below (floor side).
    3. Step-by-step:
    • Let be the number of upper floors. Total floors in the mall = (including ground floor).
    • Hub identification: The ground floor is explicitly listed as a stop for every elevator, but the capacity constraint says "at most six other floors." So the ground floor is a hub — it does not consume the capacity of 6.
    • Connector side: 7 elevators, each covering at most 6 upper floors. Total incidences .
    • Element side: Each of the upper floors must be serviced by at least 3 elevators. Total incidences .
    • Combine: .
    • Total floors = upper floors + ground floor = .
    1. Tempting wrong path: A student might include the ground floor in the capacity, thinking each elevator covers 7 floors total, leading to incidences and , total 17. Another mistake is forgetting to add the ground floor back at the end, answering 14 instead of 15.

    Verification: If , we need incidences. 7 elevators can provide exactly incidences. This is perfectly balanced and achievable. Total floors = 15.

    Question 9 · Discrete Mathematics SUB

    In a survey of 90 people about two brands and , the following is known:

    • The number who like brand is 4 times the number who like both brands.
    • The number who like brand is 3 times the number who like both brands.
    • Exactly 18 people like neither brand.

    How many people like exactly one brand?

    Correct Answer:

    60

    Step-by-Step Solution

    Key idea: This is a 2-set survey problem with multiplicative conditions relative to the intersection, recognisable because both set sizes are expressed as multiples of .

    Step 1: Let . Then and .

    Step 2: Compute the exclusive regions:

    • only
    • only

    Step 3: Write the union:

    Step 4: Use the neither information:

    Step 5: Compute exactly one:

    Step 6: Verify. , , both . Union . Neither .

    Answer: 60

    Question 10 · Programming MSQ

    Consider the standard correct algorithm for finding the closest value to a target in an array , initialized with min_diff = \infty and closest_val = null. The algorithm uses a strict inequality (current_diff < min_diff) to update the trackers. Let be an array defined by . If the target is , what is the final value of closest_val?

    1. A.

      14

    2. B.

      6

    3. C.

      18

    4. D.

      10

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: The algorithm updates closest_val only when a strictly smaller absolute difference is found, retaining the first encountered value in case of a tie.

    Step 1: Calculate the absolute difference from for each element in .

    • : , diff = . min_diff becomes 8, closest_val = 18.
    • : , diff = . Since is True, min_diff becomes 4, closest_val = 14.
    • : , diff = . Since is False, no update occurs.
    • : , diff = . Since is False, no update occurs.
    • : , diff = . Since is False, no update occurs.

    Step 2: The final closest_val remains 14, as the ties at are ignored due to the strict inequality.

    Answer: 14.

    Question 11 · Programming MSQ

    Consider the following three modified bubble sort algorithms applied to the array .

    Algorithm X: Standard ascending bubble sort. Returns the final value of A[n-1].

    Algorithm Y: Standard ascending bubble sort. Returns the final value of A[1].

    Algorithm Z: Ascending bubble sort, but the inner loop runs for j from 0 to n-3 for all passes. Returns the total number of swaps performed.

    Match the algorithms in List I with their returned values in List II.

    List I

    1. Algorithm X
    2. Algorithm Y
    3. Algorithm Z

    List II

    P. 1

    Q. 2

    R. 4

    1. A.

      1-P, 2-Q, 3-R

    2. B.

      1-R, 2-Q, 3-P

    3. C.

      1-Q, 2-R, 3-P

    4. D.

      1-R, 2-P, 3-Q

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a language-to-math question testing the ability to translate modified loop bounds into exact array states and swap counts, identifying the boundary trap.

    Step 1: Analyze Algorithm X. Standard ascending bubble sort fully sorts the array. The sorted array is . It returns A[n-1], which is A[3] = 4. Matches R.

    Step 2: Analyze Algorithm Y. Standard ascending bubble sort fully sorts the array to . It returns A[1], which is 2. Matches Q.

    Step 3: Analyze Algorithm Z. The inner loop runs j from 0 to n-3. For , n-3 = 1. So j takes values 0 and 1. This means the algorithm only ever compares indices (0,1) and (1,2). It never compares indices (2,3).

    Step 4: Trace Algorithm Z on .

    • Pass 1: (swap) . (no swap). Swaps = 1.
    • Pass 2: (no). (no). Swaps = 0.
    • Pass 3: No swaps.

    The elements at indices 2 and 3 (which are 4 and 2) are never compared, so they are never swapped. The total number of swaps is exactly 1. Matches P.

    Step 5: Combine matches: 1-R, 2-Q, 3-P.

    Answer: B

    Question 12 · Programming MSQ

    Consider the following statements regarding the space complexity and bitwise properties of XOR accumulators:

    Statement I: A 32-bit accumulator requires 32 bytes of auxiliary space.

    Statement II: If the array elements are 64-bit integers, a 32-bit accumulator processing only the lowest 32 bits will yield the exact lowest 32 bits of the true 64-bit XOR sum.

    Statement III: An 8-bit accumulator requires 1 byte of auxiliary space, and a 16-bit accumulator requires 2 bytes.

    Which of the statements given above are true?

    1. A.

      Statement I and Statement II only

    2. B.

      Statement II and Statement III only

    3. C.

      Statement I and Statement III only

    4. D.

      Statement I, Statement II and Statement III

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: XOR operates bitwise and independently on each bit position. Space optimization must respect the physical unit of data (bits vs bytes).

    Step 1: Evaluate Statement I. A 32-bit accumulator requires 32 bits of space. Since 8 bits = 1 byte, 32 bits = 4 bytes. The statement claims 32 bytes, which is a unit mismatch. False.

    Step 2: Evaluate Statement II. XOR is bitwise independent. The lowest 32 bits of the XOR sum depend only on the lowest 32 bits of the inputs. Thus, a 32-bit accumulator processing only the lowest 32 bits will yield the exact lowest 32 bits of the true 64-bit XOR sum. True.

    Step 3: Evaluate Statement III. An 8-bit accumulator requires 8 bits = 1 byte. A 16-bit accumulator requires 16 bits = 2 bytes. Both conversions are correct. True.

    Answer: B

    More CMI Data Science mock tests