Computational Essay
Sample Content
▼
Open Guidelines
Tools
Check
Publish to Cloud
Submit to Notebook Archive
Insert Code Group
Insert Headings▼
Insert Text▼
Open/Close Groups▼

Analyzing physical constants

PeterBurbery
Abstract

Section

XXXX
XXXX:
In[]:=
XXXX
Out[]=
XXXX
◼
  • XXXX
  • ◼
  • XXXX
  • Physical Constants

    I am interesting in analyzing the magnitudes of the different physical constants. I will first open the data.
    In[]:=
    physicalConstantsEntityClass=EntityClass["PhysicalConstant",All]
    Out[]=
    physical constants
    In[]:=
    physicalConstants=EntityList[physicalConstantsEntityClass]
    Get the values:
    QuantityQ will delete any missing data:
    In[]:=
    PhysicalConstantValues=Select[QuantityQ][EntityValue[physicalConstants,"Value"]]//Quiet
    Store the physical constants with no missing values:
    In[]:=
    PhysicalConstantsWithoutMissingConstantValues=Select[QuantityQ[EntityValue[#,"Value"]]&][physicalConstants]//Quiet
    Get the magnitudes:
    In[]:=
    PhysicalConstantMagnitudes=QuantityMagnitude[PhysicalConstantValues]
    Get the exponents:
    In[]:=
    physicalConstantBase10Exponents=RealExponent[PhysicalConstantMagnitudes]
    I will analyze this data with statistics:
    Get the mean:
    In[]:=
    Mean[physicalConstantBase10Exponents]
    Out[]=
    1.12992
    That makes sense. This corresponds to about 13.4872 which seems reasonable.
    In[]:=
    Mean[physicalConstantBase10Exponents]
    10
    Out[]=
    13.4872
    In[]:=
    Median[physicalConstantBase10Exponents]
    Out[]=
    0.
    In[]:=
    Commonest[physicalConstantBase10Exponents]
    Out[]=
    {0.}
    I will use floor to analyze the exponents.
    In[]:=
    Median[Floor[physicalConstantBase10Exponents]]
    Out[]=
    0
    In[]:=
    Commonest[Floor[physicalConstantBase10Exponents]]
    Out[]=
    {-27}
    That's interesting. What are these values?
    In[]:=
    ReverseSortBy[Length][GroupBy[PhysicalConstantsWithoutMissingConstantValues,Floor[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]]
    Use ceiling instead to prevent bias:
    In[]:=
    ReverseSortBy[Length][GroupBy[PhysicalConstantsWithoutMissingConstantValues,Ceiling[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]]
    Count the data:
    In[]:=
    ReverseSort[CountsBy[PhysicalConstantsWithoutMissingConstantValues,Ceiling[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]]
    Out[]=
    -2614,712,310,58,28,-98,-47,-157,806,-76,-106,05,85,275,-175,-255,-235,65,-15,94,114,-84,-274,44,214,14,-144,-334,-34,124,-64,813,303,313,-183,393,-113,-213,103,-283,-23,542,-342,-122,-132,282,152,182,522,442,-242,402,192,142,-222,-392,551,991,161,-321,371,-1041,-431,331,971,-691,431,-201,-51,261,361,791,-951,411,421,201,-301,-291,-421,251,-381,531,-511,321,241,-161,171,-641,-401,-521,221,131,291
    Check if the floor output contains the ceiling output exactly:
    In[]:=
    ContainsExactly[Values[ReverseSort[CountsBy[PhysicalConstantsWithoutMissingConstantValues,Floor[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]]],Values[ReverseSort[CountsBy[PhysicalConstantsWithoutMissingConstantValues,Ceiling[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]]]]
    Out[]=
    True
    This means it doesn't impact my analysis if I choose to use floor or ceiling, which is good to know. I'll stick with floor.
    I can also use GatherBy:
    In[]:=
    GatherBy[PhysicalConstantsWithoutMissingConstantValues,Ceiling[RealExponent[QuantityMagnitude[EntityValue[#,"Value"]]]]&]
    Get the min and max
    In[]:=
    MinMax[Floor[physicalConstantBase10Exponents]]
    Out[]=
    {-105,98}
    Visualize the data:
    In[]:=
    Histogram[Floor[physicalConstantBase10Exponents]]
    Out[]=
    Make a smooth histogram:
    In[]:=
    SmoothHistogram[Floor[physicalConstantBase10Exponents]]
    Out[]=
    -100
    -50
    50
    100
    0.005
    0.010
    0.015
    0.020
    Make a Quantile Plot:
    In[]:=
    QuantilePlot[Floor[physicalConstantBase10Exponents]]
    Out[]=
    Make a box whisker chart:
    In[]:=
    BoxWhiskerChart[Floor[physicalConstantBase10Exponents]]
    Out[]=
    Make a more accurate distribution chart:
    Make a discrete plot of the CDF:
    I will now analyze quantities I'm interested in. I don't know what several of them are so I will exclude these.
    I will analyze the really big quantities first:
    For example I can look at the equivalent forms for each large quantity:
    I will now apply this to other large quantities:
    I can now make a table:
    Look at very small values:
    Look at less extreme but still large values:
    There seems to be a bug here:
    Small constants:
    I created a relation graph with physical constants that have the compatible units: