Foundations of Data Science
From the Introduction to data science curriculum
TL;DR
Data science combines statistics, computer science, and domain expertise to extract insights and knowledge from data. It's an iterative process involving data collection, cleaning, analysis, modeling, and communication. Understanding these foundations helps you approach data problems systematically and build effective solutions.
1. The Mental Model
Think of data science as being a detective. You're given clues (data), you need to organize them, find patterns, and ultimately tell a story or predict what might happen next.
2. The Core Material
Data science isn't just one thing; it's a field built on several key pillars that work together.
The Data Science Workflow

Photo by ThisIsEngineering on Pexels
At its heart, data science follows a general process. It's not always linear; you often loop back to previous steps as you learn more.
graph TD
A["Problem Definition (What are we trying to solve?)"] --> B["Data Collection (Where do we get the data?)"]
B --> C["Data Cleaning & Preprocessing (Making data usable)"]
C --> D["Exploratory Data Analysis (EDA) (Understanding the data)"]
D --> E["Feature Engineering (Creating new, useful variables)"]
E --> F["Model Building (Using algorithms to find patterns)"]
F --> G["Model Evaluation (How good is our model?)"]
G --> H["Deployment & Monitoring (Putting the solution into action)"]
H --> A
- Problem Definition: Before touching any data, clearly define the question you want to answer or the problem you want to solve. This guides everything else.
- Data Collection: Gather relevant data from various sources (databases, APIs, web scraping, spreadsheets).
- Data Cleaning & Preprocessing: Real-world data is messy! This involves handling missing values, fixing inconsistencies, removing duplicates, and transforming data into a suitable format for analysis. This step often takes the most time.
- Exploratory Data Analysis (EDA): Visualize and summarize your data to understand its main characteristics, identify patterns, spot anomalies, and check assumptions.
- Feature Engineering: Create new variables (features) from existing ones to improve model performance. For example, combining "month" and "day" into "day_of_year".
- Model Building: Apply statistical or machine learning algorithms to build a model that can predict outcomes or uncover hidden relationships.
- Model Evaluation: Assess how well your model performs using appropriate metrics. Does it generalize well to new, unseen data?
- Deployment & Monitoring: Once a model is good enough, integrate it into an application or system, and continuously monitor its performance in the real world.
Key Skills & Concepts

Photo by Aphiwat chuangchoem on Pexels
- Statistics & Probability: Essential for understanding data distributions, hypothesis testing, correlation, and making inferences.
- Programming: Python and R are the most common languages, used for data manipulation, analysis, and model building. Libraries like Pandas, NumPy, Scikit-learn (Python) are crucial.
- Machine Learning: Algorithms that allow systems to learn from data without being explicitly programmed. This includes supervised learning (e.g., predicting house prices) and unsupervised learning (e.g., customer segmentation).
- Domain Expertise: Understanding the field the data comes from (e.g., healthcare, finance) helps interpret results and define meaningful problems.
- Communication: Clearly explaining your findings, methods, and limitations to both technical and non-technical audiences.
3. Worked Example
Let's say a local coffee shop wants to understand why some customers spend more than others.
- Problem: Identify factors influencing customer spend.
- Data Collection: They gather transaction data: customer ID, date, time, items purchased, total spend.
- Data Cleaning: They notice some entries have missing "customer ID" or incorrect "total spend" (e.g., negative values). They'll decide to remove these or correct them if possible.
- EDA: They plot average spend by day of the week, time of day, and look at the most popular items. They find higher spend on weekends.
- Feature Engineering: They might create a new feature "number of unique items purchased" per transaction, or "time since last visit".
- Model Building: They could use a simple linear regression model to predict "total spend" based on features like "number of unique items", "day of week (weekend or weekday)", and "time of day (morning/afternoon)".
- Model Evaluation: They'd check if the model's predictions are close to actual spend for new transactions using metrics like Root Mean Squared Error (RMSE).
- Deployment: If the model is good, they might use its insights to tailor promotions (e.g., a "weekend special" based on higher weekend spend).
4. Key Takeaways
- Data science is an interdisciplinary field, combining multiple skills to solve problems with data.
- The data science workflow is iterative, meaning you'll often revisit earlier steps.
- Data cleaning and preprocessing are often the most time-consuming parts of the process.
- Understanding your data through Exploratory Data Analysis (EDA) is crucial before modeling.
- Clear communication of your findings is just as important as the analysis itself.
- Python and R are the industry-standard programming languages for data science.
Common mistakes to avoid:
- Jumping straight to modeling without clearly defining the problem or cleaning the data.
- Not understanding the limitations or biases in your data.
- Using complex models when a simpler one would suffice or even perform better.
- Ignoring domain expertise, which can lead to misinterpretations or irrelevant solutions.
5. Now Try It
Think about a simple everyday problem you encounter, like trying to decide which new movie to watch.
1. Define the problem: What specific question do you want to answer about movie choice? (e.g., "Which movie will I enjoy most tonight?")
2. Identify data you'd need: What information would help you make this decision? (e.g., genre, ratings from friends, director, actors, plot summary, streaming service availability).
3. Think about cleaning: How might this "data" be messy? (e.g., inconsistent rating scales, missing genres).
4. Imagine features: What new pieces of information could you create from your existing data to help you decide? (e.g., "average rating from friends", "number of action scenes").
Success looks like you having a clear idea of what information you'd gather and how you might process it, even if you don't actually build a model.
Frequently asked about Foundations of Data Science
Study this next
Get the full Introduction to data science curriculum
Clone the complete plan to your dashboard for unlimited AI-generated notes, practice quizzes, and a personalised revision schedule.
Save this course free