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

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

    40 Qs

    Total Questions

    81 Marks

    Total Marks

    155.645 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 be a permutation of . Suppose has exactly 2 fixed points.

    How many such permutations are even?

    Question 2
    Level 3: Exam Standard

    Let .

    Find the number of inflection points of the curve on .

    Question 3
    Level 4: Challenger

    Let be a polynomial of degree 4 with leading coefficient 1. Suppose the inflection points of are at and . If has exactly three distinct local extrema, which of the following statements MUST be true?

    Question 4
    2023 PYQ
    Level 3: Exam Standard

    The mean and variance of a data set of size are 1.1 and 4.3 respectively. It was then discovered that one data point was wrongly recorded as -0.9 and should be ignored. Then we can conclude that the mean and variance of the data points satisfy

    Question 5
    2021 PYQ
    Level 3: Exam Standard
    Common Description: Description for following two questions: In the 2019-2020 season of the English Premier League (EPL), 380 matches were played in a home and away format. The figure below describes the number of goals scored by the home team and the away team against the number of matches played. For example, the home team scored one goal in 125 matches.
    8412599471681231288233841(a)(b)Number of goals scored by the home teamNumber of goals scored by the away team Which of the following statement(s) is/are correct?
    Question 6
    Level 3: Exam Standard

    A subset is chosen uniformly at random from all subsets of the set . What is the probability that the chosen subset contains at least one even number and at least one multiple of 3?

    Question 7
    2021 PYQ
    Level 3: Exam Standard
    Recall that if is a function from to and is a function from to then, is the function from to such that , for all .
    Let be the set of all functions from to such that .
    (a) Compute the number of functions whose range has three elements.
    (b) What is the cardinality of ?
    Question 8
    Level 3: Exam Standard

    Three people , , and are each either a knight (always tells the truth) or a knave (always lies). They make the following statements about each other:

    • says: "At least one of and is a knave."
    • says: "At least one of and is a knave."
    • says: "At least one of and is a knave."

    How many valid assignments of knights and knaves are possible for , , and ?

    Question 9
    Level 3: Exam Standard

    Let be chosen uniformly at random. What is the probability that ?

    Question 10
    Level 3: Exam Standard

    Consider the following pseudocode:

    ```

    function f(n):

    total = 0

    for k from 1 to n:

    if k mod 2 == 1:

    total = total + k * k

    else:

    total = total - k * k

    return total

    ```

    What is the value of f(100)?

    Question 11
    Level 4: Challenger

    Consider a sorted array of 6 distinct integers chosen from the set . Suppose contains exactly one fixed point (an index such that ). We then identify the three largest elements of to form a subset . If the second largest element in is exactly , how many such valid arrays exist?

    Question 12
    Level 3: Exam Standard

    A student implements a merge algorithm for two ascending arrays and of sizes and . They use a single loop that runs exactly times. In each iteration, they compare and and copy the smaller one, incrementing the respective pointer. They do not use any boundary checks or sentinels. Consider the following statements about this code:

    I. If the code uses the condition A[i] < B[j] and , it will copy from , which ensures that elements from appear before elements from in the merged array, preserving stability.

    II. If the loop runs exactly times without boundary checks, an out-of-bounds array access is guaranteed to occur at some point during the execution, provided and .

    III. If the input arrays are sorted in descending order, the algorithm will correctly produce a merged array in descending order without any modifications to the comparison operator.

    Which of the above statements is/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 6 for CMI Data Science: 40 Questions with Solutions & Analysis

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

    Paper breakdown

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

    Free sample questions from Mock Test 6

    Question 1 · School Level Mathematics SUB

    Let be a permutation of . Suppose has exactly 2 fixed points.

    How many such permutations are even?

    Correct Answer:

    20

    Step-by-Step Solution

    Key idea: We must count the permutations with exactly 2 fixed points and determine the parity of their cycle structures.

    Step 1: Choose the fixed points.

    There are ways to choose which 2 elements are fixed points.

    Step 2: Analyze the remaining elements.

    The remaining 3 elements must form a permutation with NO fixed points (a derangement).

    Let's find the derangements of 3 elements.

    The only way to permute 3 elements with no fixed points is a single 3-cycle.

    For example, if the elements are , the derangements are and .

    There are exactly such derangements.

    Step 3: Determine the parity.

    A permutation with 2 fixed points and one 3-cycle has the cycle structure .

    The sign is the product of the signs of the cycles.

    Sign of 1-cycle is .

    Sign of 3-cycle is .

    Therefore, EVERY such permutation is even.

    Step 4: Calculate the total count.

    Since all valid permutations are even, we just multiply the number of ways to choose the fixed points by the number of derangements.

    Total = .

    Answer: 20

    Question 2 · School Level Mathematics SUB

    Let .

    Find the number of inflection points of the curve on .

    Correct Answer:

    3

    Step-by-Step Solution

    Key idea: This is a "find_number" question involving an integral function. We must use the Fundamental Theorem of Calculus to find and then analyze its sign changes.

    Step 1: Find the first derivative using the Fundamental Theorem of Calculus.

    .

    Step 2: Find the second derivative using the product rule and chain rule.

    .

    Step 3: Factor to find candidate points.

    .

    The candidate points are where , which are , , and .

    Step 4: Test for sign changes of around these points. Note that for all , so the sign of depends entirely on .

    • For : and , so .
    • For : and , so . (Sign changes at )
    • For : and , so . (Sign changes at )
    • For : and , so . (Sign changes at )

    Step 5: Since changes sign at all three candidate points, there are exactly 3 inflection points.

    Answer: 3

    Question 3 · School Level Mathematics MSQ

    Let be a polynomial of degree 4 with leading coefficient 1. Suppose the inflection points of are at and . If has exactly three distinct local extrema, which of the following statements MUST be true?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

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

    Step-by-Step Solution

    Key idea: This is a reverse engineering and parameter analysis question. We reconstruct the derivatives from the given inflection points and use the condition for three local extrema to constrain the unknown constant.

    Step 1: Determine . Since is degree 4 with leading coefficient 1, is quadratic with leading coefficient . Given inflection points at and :

    .

    Step 2: Integrate to find .

    for some constant .

    Step 3: Evaluate at the critical points of , which are the roots of : and .

    .

    .

    Step 4: Apply the three-extrema condition. For to have three distinct local extrema, (a cubic with positive leading coefficient) must have three distinct real roots. This requires its local maximum to be positive and its local minimum to be negative.

    Since changes from positive to negative at , has a local maximum at . So , giving .

    Since changes from negative to positive at , has a local minimum at . So , giving .

    Step 5: Evaluate each option using .

    Option A: . True.

    Option B: . True.

    Option C: . True, independent of .

    Option D: . So is false.

    Answer: Options A, B, and C.

    Question 4 · Probability Theory · 2023 MSQ

    The mean and variance of a data set of size are 1.1 and 4.3 respectively. It was then discovered that one data point was wrongly recorded as -0.9 and should be ignored. Then we can conclude that the mean and variance of the data points satisfy

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["B","C"]

    Step-by-Step Solution

    Key idea: When a data point is removed, the new mean and variance can be evaluated using the original sum and sum of squares, or by analyzing the removed point's distance from the mean.

    Step 1: The original dataset has size , mean , and variance .

    Step 2: The original sum of the data is . The removed point is .

    Step 3: The new sum is . The new size is .

    Step 4: The new mean is . To compare with , we evaluate .

    Step 5: Since , , which means . Thus, the third option is correct and the fourth is incorrect.

    Step 6: For the variance, the change depends on the squared distance of the removed point from the mean. The exact formula for the new variance is .

    Step 7: We check the sign of .

    Step 8: Substitute and .

    Step 9: The numerator becomes .

    Step 10: Since , . Therefore, . Thus, the second option is correct and the first is incorrect.

    Answer: Options B and C.

    Question 5 · Probability Theory · 2021 MSQ
    Common Description: Description for following two questions: In the 2019-2020 season of the English Premier League (EPL), 380 matches were played in a home and away format. The figure below describes the number of goals scored by the home team and the away team against the number of matches played. For example, the home team scored one goal in 125 matches.
    8412599471681231288233841(a)(b)Number of goals scored by the home teamNumber of goals scored by the away team Which of the following statement(s) is/are correct?
    1. A.

      The average number of goals scored by the home team over 380 matches is less than 1.5, and for away teams are less than 1.

    2. B.

      In the whole season of the EPL, a total of 1034 goals were scored.

    3. C.

      The probability that away team failed to score any goal is 22.11%.

    4. D.

      The probability that home team scored more than 3 goals is 6.6%.

    Correct Answer:

    ["B"]

    Step-by-Step Solution

    Insight: This is an empirical expected value and probability question, requiring computation of means, totals, and probabilities from frequency data, while also recognizing real-world dataset facts or chart discrepancies.

    Exam route: Compute the sample mean for home and away teams, check total goals, and calculate specific probabilities to eliminate false options.

    Learning route:

    Step 1: Analyze the data. The problem explicitly states matches were played.

    Step 2: Verify Statement A. "Average number of goals... home team < 1.5, away team < 1".

    Home team mean: . (This is ).

    Away team mean: .

    Since is NOT less than , Statement A is FALSE. (Note: Even using the real-world away total of 466, the mean is , still not ).

    Step 3: Verify Statement B. "Total of 1034 goals were scored".

    This is a factual statistic for the 2019-2020 English Premier League season ( home goals away goals total goals). Despite the chart's minor summation discrepancy (summing to ), this statement about the "whole season" is factually TRUE and the only defensible choice.

    Step 4: Verify Statement C. "Probability that away team failed to score any goal is 22.11%".

    .

    The value actually corresponds to the HOME team (). Statement C is FALSE.

    Step 5: Verify Statement D. "Probability that home team scored more than 3 goals is 6.6%".

    .

    This does not equal . Statement D is FALSE.

    Final Answer: B is the only correct statement.

    Question 6 · Probability Theory MSQ

    A subset is chosen uniformly at random from all subsets of the set . What is the probability that the chosen subset contains at least one even number and at least one multiple of 3?

    1. A.

      45/64

    2. B.

      53/64

    3. C.

      11/16

    4. D.

      7/8

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a complementary counting question with overlapping conditions, recognisable by the "at least one X AND at least one Y" structure on random subsets.

    Step 1: Identify the total number of subsets. For a set of 9 elements, there are total subsets.

    Step 2: Define the complement events. Let be the event "contains no even number" and be the event "contains no multiple of 3". We want the probability of the complement of , which is .

    Step 3: Count the subsets for . The even numbers in are (4 elements). Subsets with no even numbers must be formed from the remaining 5 elements . Thus, .

    Step 4: Count the subsets for . The multiples of 3 in are (3 elements). Subsets with no multiples of 3 must be formed from the remaining 6 elements . Thus, .

    Step 5: Count the subsets for (no even AND no multiple of 3). The elements that are neither even nor multiples of 3 are (3 elements). Thus, .

    Step 6: Apply Inclusion-Exclusion to find .

    Step 7: Calculate the number of favorable subsets: .

    Step 8: Calculate the probability: .

    Answer: The probability is 53/64.

    Question 7 · Discrete Mathematics · 2021 SUB
    Recall that if is a function from to and is a function from to then, is the function from to such that , for all .
    Let be the set of all functions from to such that .
    (a) Compute the number of functions whose range has three elements.
    (b) What is the cardinality of ?
    Correct Answer:

    1057

    Step-by-Step Solution

    Key idea: This is an idempotent function counting question, recognizable by the condition .

    Step 1: For , the range of must be exactly the set of fixed points of . Let the range be . Then for all , .

    Step 2: For any , must be an element of .

    Step 3: To count functions with range size , we first choose the elements of from the 6 available elements in ways.

    Step 4: For the remaining elements, each can map to any of the elements in , giving choices.

    Step 5: For part (a), . The number of such functions is .

    Step 6: For part (b), we sum this over all possible range sizes :

    Total cardinality = .

    Answer: 1057 (Note: Part (a) is 540, Part (b) is 1057).

    Question 8 · Discrete Mathematics MSQ

    Three people , , and are each either a knight (always tells the truth) or a knave (always lies). They make the following statements about each other:

    • says: "At least one of and is a knave."
    • says: "At least one of and is a knave."
    • says: "At least one of and is a knave."

    How many valid assignments of knights and knaves are possible for , , and ?

    1. A.

      0

    2. B.

      1

    3. C.

      3

    4. D.

      6

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a symmetric constraint puzzle. We translate each statement into a boolean equivalence and test the possible counts of knights.

    Let where means Knight and means Knave.

    The statements translate to:

    Notice that is true unless both and are Knights.

    Let's test the possible number of Knights (from 0 to 3):

    • Case 0 Knights (all Knaves): .

    Check : is . But is , so is false. Contradiction.

    • Case 1 Knight (two Knaves): Assume .

    Check : is . But is , so is false. Contradiction. By symmetry, any 1-Knight assignment fails.

    • Case 2 Knights (one Knave): Assume .

    Check : is . is true. (Consistent)

    Check : is . is true. (Consistent)

    Check : is . is true. (Consistent)

    This assignment works! By symmetry, the assignments and also work.

    • Case 3 Knights (all Knights): .

    Check : is . is false. Contradiction.

    There are exactly 3 valid assignments.

    Answer: 3

    Question 9 · Discrete Mathematics MSQ

    Let be chosen uniformly at random. What is the probability that ?

    1. A.

      inom{15}{10} \left( rac{2}{3}ight)^{10} \left( rac{1}{3}ight)^5

    2. B.

      inom{15}{10} \left( rac{1}{3}ight)^{10} \left( rac{2}{3}ight)^5

    3. C.

      inom{15}{10} \left( rac{2}{3}ight)^5 \left( rac{1}{3}ight)^{10}

    4. D.

      inom{15}{10} \left( rac{1}{3}ight)^5 \left( rac{2}{3}ight)^{10}

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: The sum is the number of elements that map to either 1 or 2. For a random function, each element independently maps to 1, 2, or 3 with probability each. So the probability that an element maps to 1 or 2 is .

    Step 1: Define the random variable. Let . This is the number of elements in that map to either 1 or 2.

    Step 2: Determine the distribution of . Each element independently maps to 1 or 2 with probability , and to 3 with probability . So .

    Step 3: Compute the probability.

    Answer: A

    Question 10 · Programming MSQ

    Consider the following pseudocode:

    ```

    function f(n):

    total = 0

    for k from 1 to n:

    if k mod 2 == 1:

    total = total + k * k

    else:

    total = total - k * k

    return total

    ```

    What is the value of f(100)?

    1. A.

      -5050

    2. B.

      -5000

    3. C.

      -2525

    4. D.

      -10100

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: Group consecutive terms in pairs to reveal an arithmetic pattern.

    Step 1: Write out the sum explicitly:

    Step 2: Group terms in consecutive pairs:

    Step 3: Apply the difference of squares identity to each pair:

    Step 4: The resulting sequence is , which is an arithmetic progression with:

    • First term:
    • Common difference:
    • Number of terms: (since we have 100 terms grouped in pairs)

    Step 5: Use the arithmetic series sum formula where is the last term:

    Answer:

    Question 11 · Programming MSQ

    Consider a sorted array of 6 distinct integers chosen from the set . Suppose contains exactly one fixed point (an index such that ). We then identify the three largest elements of to form a subset . If the second largest element in is exactly , how many such valid arrays exist?

    1. A.

      880

    2. B.

      1100

    3. C.

      1320

    4. D.

      1540

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This requires reverse-engineering the subset properties by combining the definitions of the second largest element and the fixed-point constraint with a strict inequality condition.

    Step 1: Let the sorted subset be . The three largest elements form . The second largest in is .

    Step 2: We are given and . Since is strictly increasing, . Substituting the knowns: .

    Step 3: Analyze possible values for :

    • If : . Since is strictly increasing, must be 3. But then , creating a second fixed point. Invalid.
    • If : , but we need . Contradiction.
    • If : , but , violating the sorted order.
    • Thus, is the only valid case.

    Step 4: For , we have and .

    • must be and . To avoid a second fixed point, (already satisfied). Choices for (5 choices).
    • must be chosen from such that and none is a fixed point ().

    Step 5: Use the bijection . The constraints map to choosing a multiset of size 3 from (10 elements). The number of ways is .

    Step 6: Total valid arrays = .

    Answer: 1100.

    Question 12 · Programming MSQ

    A student implements a merge algorithm for two ascending arrays and of sizes and . They use a single loop that runs exactly times. In each iteration, they compare and and copy the smaller one, incrementing the respective pointer. They do not use any boundary checks or sentinels. Consider the following statements about this code:

    I. If the code uses the condition A[i] < B[j] and , it will copy from , which ensures that elements from appear before elements from in the merged array, preserving stability.

    II. If the loop runs exactly times without boundary checks, an out-of-bounds array access is guaranteed to occur at some point during the execution, provided and .

    III. If the input arrays are sorted in descending order, the algorithm will correctly produce a merged array in descending order without any modifications to the comparison operator.

    Which of the above statements is/are true?

    1. A.

      I only

    2. B.

      II only

    3. C.

      I and II only

    4. D.

      II and III only

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a code-trace and logic question testing boundary conditions, stability, and sorting order. We must evaluate each statement independently based on the algorithm's mechanics.

    Step 1: Analyze Statement I. If A[i] < B[j] is false when , the else branch executes, copying from . This means the element from is placed in the output before the equal element from . This violates stability (which requires 's element to come first). Thus, Statement I is false.

    Step 2: Analyze Statement II. The loop runs times. In each iteration, exactly one pointer is incremented. The maximum valid index for is and for is . The sum of the maximum valid increments is . After increments, at least one pointer must exceed its valid range. Since the loop runs times, the final iteration will definitely access an out-of-bounds index. Thus, Statement II is true.

    Step 3: Analyze Statement III. The algorithm copies the smaller element. If the inputs are descending, copying the smaller element will produce an ascending merged array, not descending. To merge descending arrays, the algorithm must copy the larger element. Thus, Statement III is false.

    Answer: B

    More CMI Data Science mock tests