필터 지우기
필터 지우기

how to find standard deviation in six sigma format?

조회 수: 5 (최근 30일)
SAKSHAM SHRIVASTAVA
SAKSHAM SHRIVASTAVA 2023년 8월 29일
댓글: Cris LaPierre 2023년 8월 30일
I have plot my data with the help of scater plot. But in data statistics it is only mean and standard deviation. I need my plot which shows 1sigma, 2 sigma , 3sigma how to do that?

답변 (1개)

Cris LaPierre
Cris LaPierre 2023년 8월 29일
편집: Cris LaPierre 2023년 8월 29일
The function std returns one standard deviation. Multiply by +/-1, +/-2 and +/-3 to get more than that.
Here's a simple example
% generate a distribution
x = linspace(425,745,200);
y = normpdf(x,580,35);
scatter(x,y)
mu = mean(x)
mu = 585
xline(mu,'g--')
sd = std(x)
sd = 93.0721
xline(mu + sd,'m--')
xline(mu - sd,'m--')
xline(mu + 2*sd,'b:')
xline(mu - 2*sd,'b:')
xline(mu + 3*sd,'k-.')
xline(mu - 3*sd,'k-.')
  댓글 수: 2
SAKSHAM SHRIVASTAVA
SAKSHAM SHRIVASTAVA 2023년 8월 30일
이동: Voss 2023년 8월 30일
I want to plot a scatter curve with mean and sd by import an excel sheet. the code is as follows:
Corrected_UV_D4_spectra_1 = xlsread('corrected_uvd4_spectra_1','sheet1','A21:B341');
data = Corrected_UV_D4_spectra_1;
x = data(:,1);
y = data(:,2);
scatter(x,y)
mu = mean(x)
xline(mu,'g--')
sd = std(x)
xline(data_mean + data_std,'m--')
xline(data_mean - data_std,'m--')
xline(data_mean + 2*data_std,'b:')
xline(data_mean - 2*data_std,'b:')
xline(data_mean + 3*data_std,'k-.')
xline(data_mean - 3*data_std,'k-.')
But plot is now coming
after getting mean and sd in command window i got the error:
warning: Error
occurred while
executing the listener
callback for event
PostUpdate defined for
class
matlab.graphics.primitive.canvas.JavaCanvas:
Dot indexing is not
supported for
variables of this
type.
Error in bfitlisten
Error in bfitlisten
Error in bfitlisten
Error in bfitlisten
Error in bfitlisten
Cris LaPierre
Cris LaPierre 2023년 8월 30일
I can't duplicate the error. Please attach your spreadsheet to your post using the paperclip icon

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by