Least squares regression - Your turn#
Note
Click the and open this notebook in Colab to enable interactivity.
Note
To save your progress, make a copy of this notebook in Colab File > Save a copy in Drive
and you’ll find it in My Drive > Colab Notebooks
.
In a laser experiment, current and laser power is collected in a test run. Find the best quadratic curve to fit the data.
Current (mA) |
Laser power (μW) |
---|---|
0.1 |
0.000 |
0.2 |
0.000 |
0.3 |
0.001 |
0.4 |
0.002 |
0.5 |
0.018 |
0.6 |
0.056 |
0.7 |
0.115 |
0.8 |
0.201 |
0.9 |
0.301 |
1.0 |
0.523 |
Hint: For a quadratic fit, find \(p\) such that \(y = p_0 x^2 + p_1 x + p_2\).
# TODO: Write your solution below
Exporting your work#
When you’re ready, the easiest way to export the notebook is to File > Print
it and save it as a PDF.
Remove any excessively long, unrelated outputs first by clicking the arrow → next to the output box and then Show/hide output
.
Obviously don’t obscure any necessary output or graphs!