### Author Topic: How many standard deviations in polygon composition calc error?  (Read 1308 times)

#### Malcolm Roberts

• Professor
• Posts: 129
##### How many standard deviations in polygon composition calc error?
« on: February 01, 2017, 12:13:15 am »
John,
The errors in the average comp for polygons in Calcimage. How many standard deviants would that be? I cannot find anything on this in the manual. Is it hiding elsewhere?
Cheers,
malc.
« Last Edit: February 01, 2017, 08:24:39 am by John Donovan »

#### John Donovan

• Emeritus
• Posts: 2379
• Other duties as assigned...
##### Re: How many standard deviations in polygon composition calc error?
« Reply #1 on: February 01, 2017, 08:38:02 am »
The errors in the average comp for polygons in Calcimage. How many standard deviants would that be? I cannot find anything on this in the manual. Is it hiding elsewhere?

Hi Malcolm,
Julie Chouinard wrote the polygon extraction code for us, so I had to check the polyxy.bas file that is in the ProgramData folder and it has this:

'Calculate the average Z
AvgZ# = Sum# / n&
'Calculate the standard deviation
Sum# = 0
For nn& = 1 To n&
Sum# = Sum# + (temp!(nn&) - AvgZ#) ^ 2
Next nn&
StdDev# = (Sum# / (n& - 1)) ^ 0.5
Debug.Print Time & "   " & "Average " & ZLabel\$(i) & " =  " & AvgZ#  & " ± " & StdDev#
'Input the Z value labels, Z values, and standard deviations into the ZValues worksheet
ZValuesWks.Cells(Row:=i, col:=1).Value = ZLabel\$(i)
ZValuesWks.Cells(Row:=i, col:=2).Value = Round(AvgZ#,2)  'rounding value to 2 decimal places
ZValuesWks.Cells(Row:=i, col:=3).Value = Round(StdDev#,2)  'rounding value to 2 decimal places

So it looks like a single normal standard deviation.
john
« Last Edit: February 01, 2017, 08:45:06 am by John Donovan »
John J. Donovan, Pres.
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

#### Malcolm Roberts

• Professor
• Posts: 129
##### Re: How many standard deviations in polygon composition calc error?
« Reply #2 on: February 01, 2017, 05:25:02 pm »
Thanks John,
Just a thought. Why not have a weighted error? That way we could get rid of outliers from e.g. cracks and holes......? Might throw up other issues but I guess where we are looking a relatively homogeneous, inclusion free domain it might prove handy?
Cheers,
Malc.

#### John Donovan

• Emeritus
• Posts: 2379
• Other duties as assigned...
##### Re: How many standard deviations in polygon composition calc error?
« Reply #3 on: February 01, 2017, 08:34:32 pm »
Thanks John,
Just a thought. Why not have a weighted error? That way we could get rid of outliers from e.g. cracks and holes......? Might throw up other issues but I guess where we are looking a relatively homogeneous, inclusion free domain it might prove handy?
Cheers,
Malc.

Hi Malcolm,
That's a good idea.  You should modify one of the "custom" scripts (polyxy_Custom1.bas or polyxy_Custom2.bas) in the ProgramData\Probe Software\Probe for EPMA folder and share it with us.

I personally find the existing script good for my own polygon extractions.  For avoiding cracks, inclusions, etc. I simply draw the polygon around any areas I do not want to have included in the averaging.

Like this:
john

« Last Edit: February 01, 2017, 11:03:05 pm by John Donovan »
John J. Donovan, Pres.
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"