Purpose
This tool can be used to:
- Create a 3D confidence ellipsoid plot for the selected XYZ scatter plot.
- Create a 3D confidence ellipsoid plot for each group level when the levels (3D scatter plots) are color indexed.
- Output principal axes and equations for 3D confidence ellipsoid.
Installation
Download the file Plot3dConfEllipsoid.opx, and then drag-and-drop onto the Origin workspace. An icon will appear in the Apps Gallery window.
NOTE: This tool requires OriginPro, and Show Principal Axes and Equations feature requires minimum version of Origin 2019b.
Operation
- Click and select an XYZ scatter plot in a graph for which you want to create an ellipsoid. If no plot is selected, the tool will use the active plot in the graph window as input.
- Click the 3D Confidence Ellipsoid icon in the Apps Gallery window to open the dialog.
- In the opened dialog, set Confidence Level and Grid Size and click OK.
- A transparent ellipsoid will be created in the graph window (Hint: To modify the Transparency setting, right-click on the ellipsoid plot in Object Manager and choose Plot Details) .
- For Origin 2019b or higher versons, Show Principal Axes and Equations check box is available at the bottom of the dialog. Check the check box, click OK, three principal axes for each confidence ellipsoid will be added in the graph, and an HTML report will be created to show semi-axes and equations for these principal axes.
Algorithm
Assume \(\bar{X}\) and S are the sample mean vector and covariance matrix for n samples with 3 variables, \(100(1-\alpha)\%\) confidence ellipsoid can be calculated using Hotelling's T-squared (\(T^2\)) distribution:
\((X-\bar{X})'S^{-1}(X-\bar{X})=\frac{3(n-1)}{(n-3)n}F_{\text{inv}}(1-\alpha,3,n-3)\),
where \(F_{\text{inv}}\) is the inverse F cumulative distribution function.
\(100(1-\alpha)\%\) prediction ellipsoid can be given as:
\((X-\bar{X})'S^{-1}(X-\bar{X})=\frac{3(n+1)(n-1)}{(n-3)n}F_{\text{inv}}(1-\alpha,3,n-3)\).
NOTES:
- If the graph layer has more than one Z dataset plotted, the ellipsoid is added only to the selected XYZ scatter plot or the active plot if no plot is selected. You can add ellipsoids to other XYZ scatter plots in turn by clicking on the plot in the graph window or by selecting it in Object Manager, then relaunching the tool.
- If you have specified a grouping column to be used for index colors for the XYZ scatter plots (open Plot Details and click the Symbol tab, then select a group column in Color: By Points: Indexing.), the tool will create one confidence ellipsoid plot for each group level. Each ellipsoid will be color-matched to its scatter plot.