r/datascience • • Sep 15 '22

Education Simplified guide to how QR codes work.

Post image
1.1k Upvotes

r/datascience • • May 09 '25

ML Client told me MS Copilot replicated what I built. It didn’t.

1.1k Upvotes

I built three MVP models for a client over 12 weeks. Nothing fancy: an LSTM, a prophet model, and XGBoost. The difficulty, as usual, was getting and understanding the data and cleaning it. The company is largely data illiterate. Turned in all 3 models, they loved it then all of a sudden canceled the pending contract to move them to production. Why? They had a devops person do in MS Copilot Analyst (a new specialized version of MS Copilot studio) and it took them 1 week! Would I like to sign a lesser contract to advise this person though? I finally looked at their code and it’s 40 lines of code using a subset of the California housing dataset run using a Random Forest regressor. They had literally nothing. My advice to them: go f*%k yourself.


r/datascience • • Jan 22 '23

Discussion Thoughts?

Post image
1.1k Upvotes

r/datascience • • Oct 08 '24

Discussion A guide to passing the A/B test interview question in tech companies

1.1k Upvotes

Hey all,

I'm a Sr. Analytics Data Scientist at a large tech firm (not FAANG) and I conduct about ~3 interviews per week. I wanted to share my advice on how to pass A/B test interview questions as this is an area I commonly see candidates get dinged. Hope it helps.

Product analytics and data scientist interviews at tech companies often include an A/B testing component. Here is my framework on how to answer A/B testing interview questions. Please note that this is not necessarily a guide to design a good A/B test. Rather, it is a guide to help you convince an interviewer that you know how to design A/B tests.

A/B Test Interview Framework

Imagine during the interview that you get asked “Walk me through how you would A/B test this new feature?”. This framework will help you pass these types of questions.

Phase 1: Set the context for the experiment. Why do we want to AB test, what is our goal, what do we want to measure?

  1. The first step is to clarify the purpose and value of the experiment with the interviewer. Is it even worth running an A/B test? Interviewers want to know that the candidate can tie experiments to business goals.

  2. Specify what exactly is the treatment, and what hypothesis are we testing? Too often I see candidates fail to specify what the treatment is, and what is the hypothesis that they want to test. It’s important to spell this out for your interviewer. 

  3. After specifying the treatment and the hypothesis, you need to define the metrics that you will track and measure.

    • Success metrics: Identify at least 2-3 candidate success metrics. Then narrow it down to one and propose it to the interviewer to get their thoughts.

    • Guardrail metrics: Guardrail metrics are metrics that you do not want to harm. You don’t necessarily want to improve them, but you definitely don’t want to harm them. Come up with 2-4 of these.

    • Tracking metrics: Tracking metrics help explain the movement in the success metrics. Come up with 1-4 of these.

Phase 2: How do we design the experiment to measure what we want to measure?

  1. Now that you have your treatment, hypothesis, and metrics, the next step is to determine the unit of randomization for the experiment, and when each unit will enter the experiment. You should pick a unit of randomization such that you can measure success your metrics, avoid interference and network effects, and consider user experience.

    • As a simple example, let’s say you want to test a treatment that changes the color of the checkout button on an ecommerce website from blue to green. How would you randomize this? You could randomize at the user level and say that every person that visits your website will be randomized into the treatment or control group. Another way would be to randomize at the session level, or even at the checkout page level. 

    • When each unit will enter the experiment is also important. Using the example above, you could have a person enter the experiment as soon as they visit the website. However, many users will not get all the way to the checkout page so you will end up with a lot of users who never even got a chance to see your treatment, which will dilute your experiment. In this case, it might make sense to have a person enter the experiment once they reach the checkout page. You want to choose your unit of randomization and when they will enter the experiment such that you have minimal dilution. In a perfect world, every unit would have the chance to be exposed to your treatment.

  2. Next, you need to determine which statistical test(s) you will use to analyze the results. Is a simple t-test sufficient, or do you need quasi-experimental techniques like difference in differences? Do you require heteroskedastic robust standard errors or clustered standard errors?

    • The t-test and z-test of proportions are two of the most common tests.

  3. The next step is to conduct a power analysis to determine the number of observations required and how long to run the experiment. You can either state that you would conduct a power analysis using an alpha of 0.05 and power of 80%, or ask the interviewer if the company has standards you should use.

    • I’m not going to go into how to calculate power here, but know that in any AB  test interview question, you will have to mention power. For some companies, and in junior roles, just mentioning this will be good enough. Other companies, especially for more senior roles, might ask you more specifics about how to calculate power. 

  4. Final considerations for the experiment design: 

    • Are you testing multiple metrics? If so, account for that in your analysis. A really common academic answer is the Bonferonni correction. I've never seen anyone use it in real life though, because it is too conservative. A more common way is to control the False Discovery Rate. You can google this. Alternatively, the book Trustworthy Online Controlled Experiments by Ron Kohavi discusses how to do this (note: this is an affiliate link). 

    • Do any stakeholders need to be informed about the experiment? 

    • Are there any novelty effects or change aversion that could impact interpretation?

  5. If your unit of randomization is larger than your analysis unit, you may need to adjust how you calculate your standard errors.

  6. You might be thinking “why would I need to use difference-in-difference in an AB test”? In my experience, this is common when doing a geography based randomization on a relatively small sample size. Let’s say that you want to randomize by city in the state of California. It’s likely that even though you are randomizing which cities are in the treatment and control groups, that your two groups will have pre-existing biases. A common solution is to use difference-in-difference. I’m not saying this is right or wrong, but it’s a common solution that I have seen in tech companies.

Phase 3: The experiment is over. Now what?

  1. After you “run” the A/B test, you now have some data. Consider what recommendations you can make from them. What insights can you derive to take actionable steps for the business? Speaking to this will earn you brownie points with the interviewer.

    • For example, can you think of some useful ways to segment your experiment data to determine whether there were heterogeneous treatment effects?

Common follow-up questions, or “gotchas”

These are common questions that interviewers will ask to see if you really understand A/B testing.

  • Let’s say that you are mid-way through running your A/B test and the performance starts to get worse. It had a strong start but now your success metric is degrading. Why do you think this could be?

    • A common answer is novelty effect

  • Let’s say that your AB test is concluded and your chosen p-value cutoff is 0.05. However, your success metric has a p-value of 0.06. What do you do?

    • Some options are: Extend the experiment. Run the experiment again.

    • You can also say that you would discuss the risk of a false positive with your business stakeholders. It may be that the treatment doesn’t have much downside, so the company is OK with rolling out the feature, even if there is no true improvement. However, this is a discussion that needs to be had with all relevant stakeholders and as a data scientist or product analyst, you need to help quantify the risk of rolling out a false positive treatment.

  • Your success metric was stat sig positive, but one of your guardrail metrics was harmed. What do you do?

    • Investigate the cause of the guardrail metric dropping. Once the cause is identified, work with the product manager or business stakeholders to update the treatment such that hopefully the guardrail will not be harmed, and run the experiment again.

    • Alternatively, see if there is a segment of the population where the guardrail metric was not harmed. Release the treatment to only this population segment.

  • Your success metric ended up being stat sig negative. How would you diagnose this? 

I know this is really long but honestly, most of the steps I listed could be an entire blog post by itself. If you don't understand anything, I encourage you to do some more research about it, or get the book that I linked above (I've read it 3 times through myself). Lastly, don't feel like you need to be an A/B test expert to pass the interview. We hire folks who have no A/B testing experience but can demonstrate framework of designing AB tests such as the one I have just laid out. Good luck!


r/datascience • • Jul 21 '22

Job Search "Only" 3 rounds of interviews!

Post image
1.1k Upvotes

r/datascience • • Jun 07 '21

Discussion Data Science and Data Analytics is becoming ultra glorified / romanticized, and I don't think people are really told what they are getting into.

1.1k Upvotes

I honestly, don't think people wanting to break into Data Science really know what all it entails. It just sounds good, and sounds like it will make them lots of money.

No one tells people what comes with the job. There are a lot of headaches that come with it, and you have to be a very patient person.

When any person starts out in IT, they learn some psychology. How to manage users and their expectations. You learn what to say and what not to say. You learn how to appear confident and reassuring even if you're getting up to speed in the moment. The good ones do anyway.

Data Science, BI, DA - you have to have those skills multiplied by ten. You have to be better than the rest at managing expectations. You have to learn how to avoid support drains, and be thinking ahead all of the time.

The data science people are the only people I respect as much as the people in Systems. Because other fields, you learn one thing and only one side of it, call yourself an engineer despite knowing one side. Sys Engineers have to know a little about everything and base knowledge in all kinds of things/ They are constantly growing. Data Science folks are similar because they have to know a wide assortment of things, and they have to know all of the tips and tricks at their disposal to get their desired result. Which means they will know Python, multiple types of SQL, Pandas, Jupyter, and so on. They'll pivot in Excel in a pinch if they need to.

But the main reason I respect them is just because of how patient they have to be to want to work in their field for 30+ years.

Our DA left in 2018 and one of my roles was a senior DBA, so they just put her job on top of mine. I learned a lot and I got very good at SQL and streamlining and reducing task turn around for reports and data tasks. But I obviously didn't have the time to dive ultra deep into the rabbit hole, and I didn't want to. Because I knew it wasn't for me.

We were acquired, and I transitioned all of that stuff onto the BI team of the new company. I have so much respect for those people. I am still answering questions and taking one off requests. This morning I was just hit in the face with how much I dislike actually doing he DS/DA side. A Sales Senior Manager needed something with some data. I asked a follow up question. I needed a key piece of info to ensure I did the right thing and didn't have to do re work later. They said they would get it to me later.

They emailed it to me at 7:11am this morning, then messaged me before my shift - "Hey, I don't see the data task with the blah blah being done. We needed it 6/3." And I am thinking - then why wait until 6/7 to give me the info. We got the request 6/4, and I asked you on 6/4, then you waited the weekend to get it to me.

And those individuals who just keep coming back telling you the data wasn't what they expected or wanted when it is what they asked for.. I'm so happy to be just a senior sys engineer again working on large scale infra.

It's not for everyone, and I think they need to talk about and teach managing expectations so you don't shoot yourself in the foot. Luckily the BI team of the new company are phenomenal, and now I am out of the game.

But I am learning more Python at home in my spare time and things like Jupyter so I don't regress skill wise. Python is useful in what I do anyway. I've rewritten several PS automation scripts in it.


r/datascience • • Jul 20 '20

Fun/Trivia Distributed Computing and SQL

Post image
1.1k Upvotes

r/datascience • • Jun 08 '20

Discussion Useless tutorials and blog post will NOT improve your CV but WILL waste our time

1.1k Upvotes

I see everywhere an inflation of data science blog posts, Medium posts, Linkedin posts which are adding literally ZERO value to everybody in the field. If you think we need another explanation of why p-values are important, or how to read a CSV file in Pandas, you are wrong and you are wasting your and my time. Walk me through a nasty dataset cleaning process. Show me an end to end project of yours. Enlighten me with that new, weird, just-out-of-the-Academic-press new kind of Neural Network. But showing me how to make a line plot in Matplotlib? Thanks, there are 5000 tutorials out there for that. If you are doing this, and hoping that your reputation will improve as a consequence (and maybe your chances of getting hired) you are doing yourself a terrible service. Stop the noise, do ONE really new and impressive thing and you will have: (1) actually added value and (2) started to make a name for yourself out there. Thanks for watching.


r/datascience • • Aug 27 '22

Job Search Entry level job market illustrated: it really is a numbers game

Thumbnail
gallery
1.1k Upvotes

r/datascience • • Feb 19 '24

Career Discussion The BS they tell about Data Science…

Post image
1.1k Upvotes
  1. In what world does a Director of DS only make $200k, and the VP of Anything only make $210k???

  2. In what world does the compensation increase become smaller, the higher the promotion?

  3. They present it as if this is completely achievable just by “following the path”, while in reality it takes a lot of luck and politics to become anything higher than a DS manager, and it happens very rarely.


r/datascience • • Nov 06 '22

Discussion Data Science Hierarchy of Needs ... as relevant as ever

Post image
1.1k Upvotes

r/datascience • • Jul 12 '22

Fun/Trivia Describe Data Science in Three Words

Post image
1.1k Upvotes

r/datascience • • Oct 06 '22

Fun/Trivia Is anyone tired of all the BS elitism about “statistical rigor”

1.0k Upvotes

These nerds talk about something like “train/test” splits and “overfitting.” Whatever loser, while you were lost in your textbook I was busy delivering actionable business insights for key stakeholders.

Look loser, I’m glad you paid big money for some fancy degree in statistics or whatever, but while you were up in your Ivory tower learning useless skills like bootstrapping, I was here on the ground working with real data, solving real business cases and delivering value.

Python? Don’t make me laugh. Excel is all you need. Why spend time on “containerization” and “dependency management” when I can fire up my trusty old XP machine in order to convert Jan’s old workbook into xlsx?

Plotting? Built into Excel. Aggregation? Built into Excel. Transformer-based natural language embeddings? Not built into Excel, and thus not important. While you were religiously watching Coursera videos, I was learning from Steve Balmer’s every move. That man knew how to deliver business insight using actionable intelligence.

I’m all about the North Star metrics. I align with the business leaders. I distill all day.

Dweebs on my team keep talking about “controlling for multiple hypotheses” and “effect sizes.” Is it an Excel function? No? Then forget it, we have real work to do here.


r/datascience • • Mar 08 '20

I got a job!!

1.0k Upvotes

After 20+interviews, 3 onsites, tons of heartbreak, feelings of failure, tears, disappointment and support and love from everyone around me I DID IT and I’m going to be a machine learning engineer.

This subreddit provided me with a wealth of information and I’m so excited to start working. What advice would you give to someone just starting a new job?

I’ll have to wear many hats, data visualization, machine learning, database development and opportunities to work on C# software development and UI dev too. Thanks for any advice!!


r/datascience • • Dec 14 '21

Discussion A piece of advice I wish I gave myself before going into Data Science.

1.0k Upvotes

And here it is: you will not have everything, so don’t even try.

You can’t have a deep understanding of every Data Science field. Either have a shallow knowledge of many disciplines (consultant), or specialize in one or two (specialist). Time is not infinite.

You can’t do practical Data Science, and discover new methods at the same time. Either you solve existing problems using existing tools, or you spend years developing a new one. Time is not infinite.

You can’t work on many projects concurrently. You have only so much attention span, and so much free time you use to think about solutions. Again, time is not infinite.


r/datascience • • Aug 05 '19

Fun/Trivia Poor little data analysts

Post image
1.0k Upvotes

r/datascience • • Mar 23 '23

Fun/Trivia Very simple guys. This is the way to go.

Post image
1.0k Upvotes

r/datascience • • Mar 28 '22

Fun/Trivia Anyone needs EC2 instance?

Post image
1.0k Upvotes

r/datascience • • Feb 21 '19

Fun/Trivia Being a recent graduate

Post image
1.0k Upvotes

r/datascience • • Jan 24 '26

Discussion Went on a date and the girl said... "Soooo.... What kind of... data do you science???"

1.0k Upvotes

Didn't know what to say. Humor me with your responses.

Update: I sent her this post and she loved it 🤣


r/datascience • • Dec 26 '21

Fun/Trivia I finally figured out K's nearest neighbors...

1.0k Upvotes

They are J and L


r/datascience • • Dec 21 '18

Fun/Trivia xkcd: Machine Learing

Post image
1.0k Upvotes

r/datascience • • Mar 18 '19

Fun/Trivia Map of Data Science

Post image
1.0k Upvotes

r/datascience • • Aug 15 '22

Fun/Trivia Prime example of omitted bovariable bias

Post image
1.0k Upvotes