Mathematica: dealing with significant figures

Click For Summary

Discussion Overview

The discussion revolves around handling significant figures and precision in data analysis using Mathematica. Participants explore methods to analyze the number of decimal places and significant figure error intervals for data with varying levels of precision.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty in analyzing data with differing precision levels in Mathematica, noting that imported data defaults to 'MachinePrecision' and does not reflect the actual precision of the values.
  • Another participant suggests using the Interval function, but the original poster clarifies that this function does not meet their needs as it requires a range rather than a single value.
  • A different approach is proposed to convert all values to scientific notation to easily determine precision, allowing for the extraction of precision information without affecting performance significantly.
  • Another participant recommends using ScientificForm as a method to achieve the desired formatting for precision analysis.

Areas of Agreement / Disagreement

Participants present multiple approaches to the problem, with no consensus on a single solution. The discussion remains unresolved as different methods are proposed without agreement on their effectiveness.

Contextual Notes

Participants express limitations regarding the handling of precision in Mathematica, particularly in relation to the default 'MachinePrecision' setting and the challenges of using the Interval function for single values.

yourgoldteeth
Messages
9
Reaction score
0
Hi everyone.

Hopefully this is easy to solve.

I have large amounts of mined data that have differing levels of precision. I want to do analysis of:

1) number of decimal places present
2) significant figure error intervals based on the precision (for instance, 0.003 could have been rounded from 0.0025 to 0.0035)

I can't find a clean way to do it in Mathematica, as importing my data makes it all 'MachinePrecision' and it thinks everything has 15.9456 digits of precision.

I've tried back doors, such as doing a StringLength[ToString[x]] but even that doesn't work for very small decimals, as it introduces scientific notation which throws everything off.

Any ideas?
 
Physics news on Phys.org
Have you looked at the Interval function?
 
Hurkyl said:
Have you looked at the Interval function?

The interval function does not appear to be what I am looking for. I have a single value, and need to specify a range based on significant figures rules for that one value. The interval function requires a range as input.
 
I would just force them all to be scientific notation, that way you know the precision. You can pluck out the precision pretty easy.

j = { .00000000000000000001,.00000000000000000000000001.,.0000000000000001}

NumberForm[j, NumberFormat->(#3&)]

Now you have a list of precisions. You can feed those into the interval range function, and just put your error ranges on in front of the exponent.

There is probably a better way, but this probably solves it.. that way you don't have to force variable precision, which will slow down your calculations.
 
This one

ScientificForm[j, NumberFormat -> (#3 &)]
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 18 ·
Replies
18
Views
3K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K