Course Content
Matlab Basics
Matlab Basics
Application: Nuclear Plant Data Analysis
Apply what you've learned to analyze power wastewater generation data coming from three nuclear power plants, and pick up a bunch of important details along the way!
The standard deviation of a random variable is defined mathematically as
where denotes the expectation value of its argument and . This assumes we know the probability distribution of .
Alternatively, when we are dealing with a set of observations of a random variable with a presumed (but unknown) distribution, we can estimate the standard deviation with this formula:
which is the formula coded in the video (note that was calculated on the line preceding the standard deviation calculation: so we reference this instead of recalculating for efficiency). A better, unbiased estimator would divide by instead of . We ignore this detail here for simplicity, however it could be easily fixed in the code by multiplying the result by:
Task
Begin by watching the video to grasp the program's objectives. Use the video as a source of inspiration and guidance for your approach.
Locate the file containing the data you'll be working with.
Use appropriate libraries or methods to read the data from the Excel file.
- Divide the data based on the plant location;
- Compute descriptive statistics (minimum, maximum, mean, and standard deviation) for each location, focusing on both power and wastewater data across the entire year.
Save your results, including the calculated statistics, into an Excel file for further use.
- Attempt to design your program in a modular and structured way;
- If you encounter issues, rely more on hints or code shown in the video;
- As a last resort, replicate the code in the video as closely as possible.
Validate your program's output by comparing it with the results shown in the video to ensure accuracy and reliability.
However, fair warning: it's better to practice coding your own versions now while there's a safety net, as we'll start getting less explicit with the code we show beginning in the next chapter.
The video also highlights several convenient checkpoints where you can check your programming as you go along by either:
- Unsilencing variables (by removing the semicolon);
- Having your function temporarily output the variable in question.
Thanks for your feedback!