Data science Online Coding Test

  • Junior, senior or expert
  • Question bank or custom questions
  • Updated

A CoderPad data science test is an online test you build in CoderPad Screen covering Python, R, statistics and model evaluation, from the CoderPad question bank or your own, at junior, senior or expert level. Data scientists and machine learning engineers answer online, and the scored report shows their code for each question.

What can your data science coding test cover?

The CoderPad question bank includes data science questions on pandas and NumPy, R, the bias-variance trade-off, cross-validation, and precision, recall and F1, suited to data scientist, machine learning and analyst roles. Build your test from these questions, your own, or both. Some questions ask candidates to fix a broken function, such as a cosine similarity that returns the wrong value.

Data science skills to assess
  • Python with pandas and NumPy
  • R
  • Statistics (bias-variance trade-off, cross-validation)
  • Model evaluation (precision, recall, F1)
  • Vector math, such as cosine similarity
Jobs using data science
  • Data scientist
  • Machine learning engineer
  • Data analyst
Question typesMultiple choice, coding exercises
LevelsJunior, Senior, Expert
QuestionsFrom the CoderPad question bank, your own questions, or both
Test lengthSet by the questions you choose

Sign up free to explore the question bank and try the candidate experience

Sample data science coding question: Fix cosine similarity and Euclidean distance in R

The R functions cosine() and euclidean() below return wrong values. Fix both functions without changing the helper functions norm() and dot().

# Use print(var) or cat("Messages...") to debug your solution.

# Helper functions
norm <- function(x) sqrt(sum(x^2))
dot <- function(x, y) sum(x*y)

cosine <- function(vector1, vector2) {
    # Fix me
    norm(vector1) * norm(vector2) / dot(vector1, vector2)
}

euclidean <- function(vector1, vector2) {
    # Fix me
    sqrt(norm(vector1 - vector2))
}

What a good solution shows

  • Rewrites cosine() as dot(vector1, vector2) / (norm(vector1) * norm(vector2)).
  • Rewrites euclidean() as norm(vector1 - vector2), with no extra square root.
  • Tests both data science functions on simple vectors, such as c(1, 0) and c(0, 1).

Preview a sample coding test report

How is a data science coding test scored?

CoderPad Screen auto-grades each candidate's answers and gives you a scored report. The report shows each candidate's strengths and weaknesses and compares their skills with others who took similar assessments.

Code playback shows how each candidate thinks:

  • See how they approach a problem and build their solution.
  • Note areas to explore further in later interviews.
  • Spot questionable or concerning behavior.
Code playback replays how a candidate wrote their answer.

How CoderPad prevents cheating in data science tests

Code playback shows how a candidate built each data science answer, so code pasted from a notebook stands out. To confirm they understand it, add a video follow-up question that asks them to explain their solution and the main decisions behind it.

  • Code playback

    See how candidates wrote their code or text.

  • Plagiarism detection

    Flags when a previous candidate's exact code is reused.

  • Copy/paste tracking

    Shows when code may have come from elsewhere.

  • AI follow-up questions

    Check candidates understand their code.

How building a data science coding test works

  1. Build the test

    Pick data science questions from the CoderPad question bank, write your own, or combine both.

  2. Invite candidates

    Send each candidate a link to the test by email.

  3. Candidates take the test

    They code in the browser, with nothing to install.

  4. Review results

    Read the scored report and watch the code playback.

Create and send coding assessments in 60 seconds, even if you're not techy. Choose the level and the number of questions, and add your own coding exercises whenever you need them.

How do you test data science skills before hiring?

Assess data science candidates with a coding test, a notebook they can explain from start to finish, and a live discussion about validating models. A Kaggle ranking alone doesn't show whether someone avoids data leakage.

Questions to ask and signals to look for at each step:

  • Portfolio

    Ask for a notebook that states a question, validates the model and explains the result.

  • Code on GitHub

    Reproducible environments and documented feature choices on GitHub or Kaggle show care.

  • Coding test level

    Use the junior level for analysts moving into modeling and the expert level for scientists who own models in production.

  • Live interview

    Discuss how to choose k in k-means, from CoderPad's data science interview questions.

How should you screen data science candidates?

  • Send the data science test before any take-home project, so candidates who don't pass skip hours of work.
  • Keep the test shorter than a take-home, with questions in Python, R or both.
  • Say in the job ad whether the role uses Python, R or both, and list the online test as the first step.

We had no unified approach or tool to assess technical ability. Today, CoderPad Screen enables us to test against a wide selection of languages and is continually updated.

CoderPad code interview all

Trusted by 4,000+ customers worldwide

Security and compliance

  • SSO / SAML

    Okta, Azure AD, Google and other SAML 2.0 providers, on the Enterprise plan.

  • SOC 2 Type 2

    SOC 2 Type 2 report available.

  • GDPR compliant

    GDPR and CCPA compliant.

Read about CoderPad security

Hire data scientists with CoderPad

Request a demo