0
$\begingroup$

I was given a question as part of the interview process for a job and I was looking for some advice. In this question I was given some (x,y) data (both univariate) and was asked to construct a mathematical model. Literally no other information was given. So I'm wondering what to do here. I could fit the data with a polynomial model such that the error is zero, however this would obviously overfit the data hugely. However, the question never mentions anything about using the model for prediction. So should I try to reduce overfitting or not? I'm wondering if anyone could give me some advice for this.

$\endgroup$
6
  • $\begingroup$ Many questions used for interviews do not have an actual answer, they simply want to see how you handle an abstract problem such as this. You may want to provide an answer if the outcome is continuous and another answer if the outcome is binary or discrete as this basic distinction will change virtually every step of your analysis plan. $\endgroup$ Sep 12 '13 at 14:40
  • $\begingroup$ I am given the actual data. The output is continous $\endgroup$ Sep 12 '13 at 15:11
  • $\begingroup$ How large is the sample? How many potential predictor variables do you have? $\endgroup$ Sep 12 '13 at 15:13
  • $\begingroup$ only 100 data points. Only 1 predictor variable (hence univariate). $\endgroup$ Sep 12 '13 at 15:17
  • $\begingroup$ Did you try performing a simple linear regression? If so, what was the $R^2$? $\endgroup$ Sep 12 '13 at 15:22
1
$\begingroup$

I agree, you could do that, but that is definitely overfitting the model. In addition, this is difficult as you do not have any information for what the model will be used for. Personally, I would present both a simple linear regression (after performing the appropriate regression diagnostics) as well as the polynomial function of degree 99.

Additionally, it may be helpful to provide the pros and cons of each regression model in regards to your data/overfitting.

It shows that you thoroughly thought about the task at hand and are able to come up with more than one solution to a given problem. Both must haves for a new hire! Best of luck!

$\endgroup$
2
  • 1
    $\begingroup$ Thanks. If I go down the preventing overfitting road there is potentially a lot more work to do. I guess I should just present both solutions and they can pick the one they like :) $\endgroup$ Sep 12 '13 at 15:52
  • $\begingroup$ That sounds like a solid plan! Let me know if you need anything else! :) No problem, Quick R really helped me learn the basics (and some more advanced concepts as well) in R when I was first learning the program. It is very helpful for a wide range of things. $\endgroup$ Sep 12 '13 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.