To illustrate a simple linear regression example in Python, we can use synthetic data. Let's create a small dataset that simulates the relationship between engine size (in liters) and fuel efficiency (in miles per gallon) for a set of cars. We'll use the `scikit-learn`

library for the regression analysis and `matplotlib`

for plotting.

Here's a step-by-step guide along with the Python code:

- Generate Synthetic Data: Create a dataset of engine sizes and corresponding fuel efficiencies.
- Create a Linear Regression Model: Use
`scikit-learn`

to fit a linear regression model. - Predict and Plot: Predict fuel efficiency for a range of engine sizes and plot the results.