Beruflich Dokumente
Kultur Dokumente
Please do your best and know that most successful MSDS candidates will not be able to answer
every question. In addition to correct answers, we’re also interested in understanding your
approach to solving problems and your ability to demonstrate that you can deliver work in agreed
upon timeframes. You may consult the Internet, calculators and textbooks, but may not ask other
people for assistance in solving the problems.
If you are unable to answer any of the questions and require recommendations on how to pick up
the skillsets required to tackle the challenge exam please send an email to
DataScience@sps.cuny.edu.
R Questions
1. A summer camp is creating groups for students and decided to put the siblings in the same
group if the age of both the kids are less or equal to five. The code is given below.
a) Find what is wrong in the code, Explain.
Use any “apply” method to get the difference between the max score and the min score of each
student:
3. Write a function in R that takes a word and checks whether the word is a palindrome or not.
Returning True if the input word is a palindrome and returning False if it is not. (Note:
Palindromes are words that read the same backwards as they do forward, e.g. civic, level)
4. Write an R function that will take two words to check whether they are the same word or not.
The checking is case insensitive. So “Hello” and “hello” will return true.
SQL Questions
1. What are the different types of SQL statements? Explain and provide one example.
Employee Table:
a) Write a SQL query to fetch the record with second highest salary.
1 4 3
[3 7 1]
2 0 3
3. System of Equations: Find a solution to the following linear equation:
x + 3y - 4z = -3
-2x + 2y + z = 0
3x - 2y + 2z = 8
4. Calculus: Integrate tan(x) dx using u-substitution. Please show all your work.
5. Bayes Theorem: Three companies A, B and C produce and supply 20%, 55% and 25% of the
widgets needed by your company. From past data, it can be shown that 4%, 3% and 1%
(respectively) of these widgets produced by these companies are defective. If a notebook was
found to be defective, what is the probability that the notebook was supplied by A?