CMI Data Science
    Previous Year Papers
    Verified Solutions Included
    CMI Data Science 2026 Question Paper with Solutions: 25 Questions, Answer Key & Section-wise Analysis

    CMI Data Science 2026 previous year paper: 25 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    25 Qs

    Total Questions

    57 Marks

    Total Marks

    1.995 Mins

    Duration

    +3 / -1 / 0

    Marking Scheme

    Section-wise Paper Structure

    School Level Mathematics

    9 Qs

    36% of total marks

    Programming

    6 Qs

    24% of total marks

    Discrete Mathematics

    6 Qs

    24% of total marks

    Probability Theory

    4 Qs

    16% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2026 PYQ
    Level 3: Exam Standard

    Let be a real matrix such that . Determine all possible values of .

    Question 2
    2026 PYQ
    Level 3: Exam Standard

    Consider the single variable, real-valued function . Which of the following statements about are true?

    Question 3
    2026 PYQ
    Level 3: Exam Standard

    There are 10 switches labeled 1 to 10, all initially turned OFF. You perform the following operation: at step , you toggle (an ON switch is turned OFF and vice versa) every switch whose label is divisible by . After performing 10 such steps, which switches are in ON position?

    Question 4
    2026 PYQ
    Level 3: Exam Standard

    A student writes the following code to compute the average of numbers :

    sum = 0

    for i = 1 to n:

    sum = sum + A[i]

    avg = sum/n

    return avg

    Which of the following statements about this piece of code are correct?

    Question 5
    2026 PYQ
    Level 3: Exam Standard

    In the following code, the operator denotes the remainder after integer division.

    function mystery(n) {

    result = 0;

    for i from 1 to n {

    if (i % 2 == 0) {

    result = result + i;

    } else {

    result = result - i;

    }

    }

    return(result);

    }

    What does mystery(10) return?

    Question 6
    2026 PYQ
    Level 3: Exam Standard

    Common Description:

    <b>Questions 17 to 19</b> are based on the following code.

    The arguments to the function enigma(A, n) in the code below are: (i) an integer array A indexed from 0, and (ii) the number n of elements in A.

    function enigma(A, n) {

    for i from 0 to n - 1 {

    for j from 0 to n - 2 - i {

    if (A[j] > A[j+1]) {

    temp = A[j];

    A[j] = A[j+1];

    A[j+1] = temp;

    }

    }

    }

    return(A[0]);

    }

    Answer the next three questions about this function.

    What does enigma([3, 1, 4, 2, 5], 5) return?

    Question 7
    2026 PYQ
    Level 3: Exam Standard

    Five people, sit in a row. Two particular people, and , refuse to sit next to each other. Which of the following are true?

    Question 8
    2026 PYQ
    Level 3: Exam Standard

    How many 3-element subsets of contain exactly one pair of consecutive integers?

    Question 9
    2026 PYQ
    Level 3: Exam Standard

    Arrange the numbers in a row. We say a number is <b>well-placed</b> in the given arrangement if it appears in position , starting from the left. For example, in the arrangement , the numbers 3 and 5 are well-placed. We are interested in arrangements where no number is well-placed. How many such arrangements exist?

    Question 10
    2026 PYQ
    Level 3: Exam Standard

    An insurance company offers a special policy covering two independent risk events in a policyholder’s life over one year: a <b>medical emergency</b> and a <b>vehicle accident</b>. Based on historical actuarial data:

    A claim is considered <b>valid</b> if <b>at least one</b> of the two events occurs during the year. Each policyholder pays an annual premium of <b>Rs. 4,800</b>, and if a valid claim is filed, the company pays out <b>Rs. 6,000</b> (no payout otherwise). Which of the following statements are correct?

    Question 11
    2026 PYQ
    Level 3: Exam Standard

    Let and be the outcomes of two independent rolls of a fair die. Define . Which of the following are true?

    Question 12
    2026 PYQ
    Level 3: Exam Standard

    A subset (possibly empty) of is chosen uniformly at random. What is the probability that the chosen subset contains at least one even number and at least one odd number?

    Unlock All 25 Questions in Real Examination Mode

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

    More CMI Data Science Previous Year Papers

    Free preview ends here

    Login to view the complete paper 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.

    CMI Data Science 2026 Question Paper with Solutions: 25 Questions, Answer Key & Section-wise Analysis

    CMI Data Science 2026 previous year paper: 25 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    Paper breakdown

    25 questions · 57 marks · 1.995 minutes. School Level Mathematics: 9 · Programming: 6 · Discrete Mathematics: 6 · Probability Theory: 4

    Free sample questions from CMI Data Science 2026 Question Paper

    Question 1 · School Level Mathematics · 2026 SUB

    Let be a real matrix such that . Determine all possible values of .

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: The equation restricts the eigenvalues of to the roots of .

    Exam route: Since , any eigenvalue must satisfy , so . For a matrix, the trace is the sum of its two eigenvalues. The possible multisets of eigenvalues are , , and . Their sums are , , and . All are realizable by real matrices.

    Learning route:

    1. Key idea: This is a polynomial-constraint-on-eigenvalues question. The matrix satisfies where .
    2. Why it applies: If , then . Since , we get , so .
    3. Working step by step: The trace is the sum of the eigenvalues.
    • .
    • .
    • .
    1. Answer: The possible values are .
    2. Common trap: Assuming , which only gives trace and misses the other valid involutory matrices.

    Verification: has trace and . has trace and squares to . has trace and . All three check out.

    Question 2 · School Level Mathematics · 2026 MSQ

    Consider the single variable, real-valued function . Which of the following statements about are true?

    1. A.

      is increasing for all .

    2. B.

      has exactly 2 critical points.

    3. C.

      has exactly one inflection point.

    4. D.

      is bounded below.

    Correct Answer:

    ["B","C"]

    Step-by-Step Solution

    Key idea: Analyze the properties of using derivatives to check monotonicity, critical points, inflection points, and boundedness.

    Step 1: Find Critical Points.

    .

    Set :

    .

    There are exactly 2 critical points. (Statement B is True).

    Step 2: Check Monotonicity.

    .

    For , (Decreasing).

    Since it decreases in , it is NOT increasing for all . (Statement A is False).

    Step 3: Check Inflection Points.

    .

    Set .

    Check sign change of :

    For , (Concave Down).

    For , (Concave Up).

    Concavity changes at . Exactly one inflection point. (Statement C is True).

    Step 4: Check Boundedness.

    As , .

    The function is not bounded below. (Statement D is False).

    Answer: B, C

    Question 3 · School Level Mathematics · 2026 MSQ

    There are 10 switches labeled 1 to 10, all initially turned OFF. You perform the following operation: at step , you toggle (an ON switch is turned OFF and vice versa) every switch whose label is divisible by . After performing 10 such steps, which switches are in ON position?

    1. A.

      1,4,9

    2. B.

      2,4,6,8

    3. C.

      1,4,9,10

    4. D.

      1,3,6,9

    Correct Answer:

    ["A"]

    Step-by-Step Solution

    Insight: A switch toggled once per divisor ends ON iff it has an odd number of divisors — which happens exactly for perfect squares.

    Exam route: List the perfect squares in : they are . Match to option A.

    Learning route:

    1. This is a divisor-parity toggle problem, recognisable because each switch is toggled at step iff .
    2. The number of times switch is toggled equals the number of positive divisors of , denoted .
    3. A switch starts OFF and ends ON iff it is toggled an odd number of times, i.e. is odd.
    4. Divisors of pair up as . The only unpaired divisor occurs when , i.e. .
    5. Therefore is odd is a perfect square.
    6. Perfect squares in are .
    7. Verification:
    • : divisors , (odd) ON
    • : divisors , (odd) ON
    • : divisors , (odd) ON
    • : divisors , (even) OFF
    • : divisors , (even) OFF

    Answer: switches are ON, matching option A.

    Question 4 · Programming · 2026 MSQ

    A student writes the following code to compute the average of numbers :

    sum = 0

    for i = 1 to n:

    sum = sum + A[i]

    avg = sum/n

    return avg

    Which of the following statements about this piece of code are correct?

    1. A.

      The code always returns the correct average.

    2. B.

      The output depends on the order of the input values.

    3. C.

      In general, the code doesn't calculate the correct average.

    4. D.

      The variable avg is unnecessarily updated.

    Correct Answer:

    ["A","D"]

    Step-by-Step Solution

    Insight: The code computes the total sum by the end of the loop, and the final assignment to avg uses this complete sum, making the final output mathematically correct despite redundant intermediate calculations.

    Exam route: Trace the loop to the final iteration (). At this point, sum holds . The last executed line is avg = sum/n, which is exactly the definition of the average. Thus, the final returned value is correct. However, updating avg inside the loop is redundant and inefficient.

    Learning route:

    Step 1: Initialize sum = 0.

    Step 2: The loop runs from to .

    Step 3: In each iteration, sum accumulates . By the end of iteration , sum .

    Step 4: In each iteration, avg is recalculated as sum/n.

    Step 5: On the final iteration (), avg is assigned the value , which is the correct average.

    Step 6: Evaluate the options. Option A is true because the final output is mathematically correct. Option B is false because addition is commutative, so order does not affect the final sum. Option C is false because the code does calculate the correct average. Option D is true because updating avg times is unnecessary; it could be computed once after the loop finishes.

    Question 5 · Programming · 2026 MSQ

    In the following code, the operator denotes the remainder after integer division.

    function mystery(n) {

    result = 0;

    for i from 1 to n {

    if (i % 2 == 0) {

    result = result + i;

    } else {

    result = result - i;

    }

    }

    return(result);

    }

    What does mystery(10) return?

    1. A.

    2. B.

      5

    3. C.

      10

    4. D.

      0

    Correct Answer:

    ["B"]

    Step-by-Step Solution

    Key idea: This is a tabular tracing question with an alternating accumulator pattern, recognisable because it uses a loop with a modulo condition to add or subtract the loop variable from a running total.

    Step 1: Initialize result = 0. The loop runs for i from 1 to 10.

    Step 2: Trace the loop step-by-step.

    • i=1 (odd): result = 0 - 1 = -1
    • i=2 (even): result = -1 + 2 = 1
    • i=3 (odd): result = 1 - 3 = -2
    • i=4 (even): result = -2 + 4 = 2
    • i=5 (odd): result = 2 - 5 = -3
    • i=6 (even): result = -3 + 6 = 3
    • i=7 (odd): result = 3 - 7 = -4
    • i=8 (even): result = -4 + 8 = 4
    • i=9 (odd): result = 4 - 9 = -5
    • i=10 (even): result = -5 + 10 = 5

    Step 3: The loop terminates and returns result, which is 5.

    Answer: 5 (Option B)

    Question 6 · Programming · 2026 MSQ

    Common Description:

    <b>Questions 17 to 19</b> are based on the following code.

    The arguments to the function enigma(A, n) in the code below are: (i) an integer array A indexed from 0, and (ii) the number n of elements in A.

    function enigma(A, n) {

    for i from 0 to n - 1 {

    for j from 0 to n - 2 - i {

    if (A[j] > A[j+1]) {

    temp = A[j];

    A[j] = A[j+1];

    A[j+1] = temp;

    }

    }

    }

    return(A[0]);

    }

    Answer the next three questions about this function.

    What does enigma([3, 1, 4, 2, 5], 5) return?

    1. A.

      1

    2. B.

      3

    3. C.

      4

    4. D.

      5

    Correct Answer:

    ["A"]

    Step-by-Step Solution

    Key idea: This is an algorithm tracing question, recognizable by the nested loops and conditional swap, which is the standard structure of Bubble Sort.

    Step 1: Identify the algorithm. The nested loops with if (A[j] > A[j+1]) and a swap indicate that the function sorts the array A in non-decreasing (ascending) order.

    Step 2: Understand the return value. After the sorting loops complete, the function returns A[0].

    Step 3: In a sorted array, A[0] is the smallest (minimum) element.

    Step 4: For the input [3, 1, 4, 2, 5], the sorted array is [1, 2, 3, 4, 5].

    Step 5: The function returns A[0], which is 1.

    Answer: A

    Question 7 · Discrete Mathematics · 2026 MSQ

    Five people, sit in a row. Two particular people, and , refuse to sit next to each other. Which of the following are true?

    1. A.

      The number of valid arrangements is

    2. B.

      The probability that and are not adjacent is

    3. C.

      The number of arrangements (where and are not adjacent) in which and sit next to each other is 36

    4. D.

      The number of arrangements (where and are not adjacent) in which and sit next to each other is 48.

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Key idea: This is a complement counting and conditional arrangement problem. We evaluate each statement using the total arrangements and subtracting the forbidden "adjacent" cases.

    Step 1: Total arrangements of 5 people = .

    Step 2: Arrangements where A and B are adjacent: Treat (A,B) as a single block. We have 4 entities to arrange: .

    Step 3: Valid arrangements (A and B not adjacent) = Total - Adjacent = .

    Statement A says , which is . This is True.

    Step 4: Probability A and B are not adjacent = Valid / Total = . Statement B is True.

    Step 5: Evaluate Statement C: Arrangements where A and B are NOT adjacent, but A and D ARE adjacent.

    Total where A and D are adjacent = .

    Within these, how many have A and B adjacent? If A is adjacent to both D and B, A must be in the middle: (D-A-B) or (B-A-D).

    Treat (D-A-B) as one block. Entities: (DAB), C, E .

    Since it can be DAB or BAD, total = .

    So, A and D adjacent BUT A and B not adjacent = . Statement C is True.

    Step 6: Evaluate Statement D: Arrangements where A and B are NOT adjacent, but D and E ARE adjacent.

    Total where D and E are adjacent = .

    Within these, how many have A and B adjacent? We have blocks (D,E) and (A,B), plus C.

    Entities: 3. Arrangements = . Internal swaps: . Total = .

    So, D and E adjacent BUT A and B not adjacent = .

    Statement D claims 48, which is False.

    Answer: A, B, C are true.

    Question 8 · Discrete Mathematics · 2026 MSQ

    How many 3-element subsets of contain exactly one pair of consecutive integers?

    1. A.

      20

    2. B.

      36

    3. C.

      30

    4. D.

      56

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Key idea: This is a "consecutive-pair subset counting" question. The trigger is "exactly one pair of consecutive integers" in a 3-element subset. The method is to fix the consecutive pair, then choose the third element while excluding neighbours that would create a second pair.

    Step 1: Count total 3-subsets for reference.

    .

    Step 2: Identify all consecutive pairs in .

    The pairs are — seven pairs total.

    Step 3: For each pair , count valid third elements.

    The third element must not equal or (already chosen), and must not be (which would form pair ) or (which would form pair ).

    Step 4: Count case by case.

    • Pair : exclude . Valid third elements: → 5 choices.
    • Pair : exclude and . Valid: → 4 choices.
    • Pair : exclude and . Valid: → 4 choices.
    • Pair : exclude and . Valid: → 4 choices.
    • Pair : exclude and . Valid: → 4 choices.
    • Pair : exclude and . Valid: → 4 choices.
    • Pair : exclude . Valid: → 5 choices.

    Step 5: Sum and verify no overcount.

    Total .

    Each subset with exactly one consecutive pair has a unique such pair, so no subset is counted twice.

    Verification: no-consecutive subsets ; three-consecutive subsets . Check: . ✓

    Answer: C (30)

    Question 9 · Discrete Mathematics · 2026 MSQ

    Arrange the numbers in a row. We say a number is <b>well-placed</b> in the given arrangement if it appears in position , starting from the left. For example, in the arrangement , the numbers 3 and 5 are well-placed. We are interested in arrangements where no number is well-placed. How many such arrangements exist?

    1. A.

      20

    2. B.

      44

    3. C.

      60

    4. D.

      45

    Correct Answer:

    ["B"]

    Step-by-Step Solution

    Key idea: This is a derangement counting problem, recognisable because we need permutations of where NO element appears in its natural position (zero fixed points). The phrase "no number is well-placed" is the definition of a derangement.

    Step 1: Identify the structure. We seek , the number of derangements of 5 elements. A derangement is a permutation with for all .

    Step 2: Apply the derangement formula derived via inclusion-exclusion:

    Step 3: Substitute :

    Step 4: Compute each term inside the parentheses:

    Step 5: Find a common denominator (120):

    Step 6: Multiply by :

    Step 7: Verify with the recurrence :

    . ✓

    Trap check: Option D (45) is close to 44 and tempts arithmetic slips. Option A (20) might come from or a partial inclusion-exclusion. Option C (60) is , a naive "half are derangements" guess.

    Answer: 44

    Question 10 · Probability Theory · 2026 MSQ

    An insurance company offers a special policy covering two independent risk events in a policyholder’s life over one year: a <b>medical emergency</b> and a <b>vehicle accident</b>. Based on historical actuarial data:

    A claim is considered <b>valid</b> if <b>at least one</b> of the two events occurs during the year. Each policyholder pays an annual premium of <b>Rs. 4,800</b>, and if a valid claim is filed, the company pays out <b>Rs. 6,000</b> (no payout otherwise). Which of the following statements are correct?

    1. A.

      The probability of valid claim is .

    2. B.

      A single policyholder renews the same policy for four consecutive years. The probability that she files a valid claim in exactly one of the four years equals

    3. C.

      A family of four members each independently hold this policy for a year. The probability that exactly one of the four members files a valid claim equals

    4. D.

      If 800 policyholders are enrolled under this policy in a given year, the expected profit of the insurance company for the year equals <b>Rs. 19,44,000</b>.

    Correct Answer:

    ["A","C"]

    Step-by-Step Solution

    Key idea: This is an insurance/binomial probability question. First compute the probability that one policyholder has a valid claim. Then use that probability in binomial statements and expected-profit calculations.

    Step 1: Compute the probability of a valid claim for one policyholder.

    A valid claim occurs if at least one of the two independent events happens. Use the complement:

    Now,

    and

    By independence,

    Therefore,

    So option A is correct.

    Step 2: Check option B.

    For four consecutive years, exactly one valid claim should use the binomial probability with :

    Option B has the exponents reversed, using . That corresponds to exactly three valid claims, not one. So B is incorrect.

    Step 3: Check option C.

    For four independent family members, exactly one valid claim again has probability

    This is the correct binomial setup. The decimal approximation printed in the option appears to contain a typo, but the algebraic statement is the intended correct binomial expression. Thus C is treated as correct.

    Step 4: Check option D.

    For one policyholder, expected payout is

    Expected profit per policyholder is

    For 800 policyholders, expected profit is

    This is Rs. 31,44,000, not Rs. 19,44,000. So D is incorrect.

    Answer: Options A and C are correct.

    Question 11 · Probability Theory · 2026 MSQ

    Let and be the outcomes of two independent rolls of a fair die. Define . Which of the following are true?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Insight: This is a "max of independent RVs" question. The key is to work through the CDF first: , then get the PMF by differencing: .

    Exam route: Use the formula to check each option in seconds.

    • A: ✓
    • B: ✓
    • C: ✓
    • D: ✗

    Learning route:

    Step 1: Find . Since are independent, . For a fair die, . So .

    Step 2: Find . .

    Step 3: Check each option.

    • A: . True.
    • B: . True.
    • C: . Since , true.
    • D: . The option claims , which is false.

    Common trap: For option D, a student might count the pairs with as (incorrectly subtracting the pair thinking it is double-counted). The correct count is simply pairs, giving .

    Question 12 · Probability Theory · 2026 MSQ

    A subset (possibly empty) of is chosen uniformly at random. What is the probability that the chosen subset contains at least one even number and at least one odd number?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["D"]

    Step-by-Step Solution

    Key idea: this is a uniform random subset question with a complement + inclusion–exclusion structure. The set has 3 even and 3 odd elements.

    Total subsets: .

    Let "subset has no even" and "subset has no odd". We want .

    • : subset chosen from only. .
    • : subset chosen from only. .
    • : subset with neither even nor odd = the empty set. .

    By inclusion–exclusion:

    Favourable subsets = .

    Answer: D.

    Other CMI Data Science papers