In literature, the proton-neutron mass difference is explained by electrostatic interactions. A fundamental review “Beta-decay of neutron” by B.G. Erozolimsky  and article “Neutron” in “Physical encyclopaedia”  present no calculation data concerning this parameter. A monograph  considers two ways of calculating the neutron-proton mass difference. The mass difference cannot be calculated by using a powerful instrument of quantum electrodynamics due to the divergences related to a point character of particles, which is admitted by the author. “Having failed with fundamental theory to get information on electromagnetic mass difference, we now turn to much cruder pictures to discuss the possible relations of in different terms of an or -multiplet”. Calculations in  perfectly agree with the experimental value of proton and neutron mass difference, whereas agreement with experimental data on mass difference for other terms of multiplet is noticeably worse.
Below we suggest a model, which employs a more conservative mathematical tool, which helps one to calculate the mass difference for neutron and proton, and to estimate nucleon distances at which strong (gluon) interactions are revealed. It is also explained, why mass differences for other baryons cannot be calculated in the frameworks of the suggested model. As far as the authors know in recent decades, the Monte Carlo method has not been used to calculate the difference between the mass of the neutron and the proton.
2. Qualitative Analysis of the Model
According to modern view, neutron is a system of three quarks (udd) and proton is a system of three quarks (uud), where d is the quark with the charge , and u is the quark with the charge , here e is the elementary charge. To perform qualitative calculation, consider the following neutron and proton models (Figure 1):
Quarks occupy apexes of equilateral triangle inscribed into a circle of radius r, where r is a radius of proton or neutron. The radii of proton and neutron are determined by the strong coupling between quarks independent of electric charge; hence, it is assumed that these radii are equal. In this case one can easily calculate the electrostatic energy.
As mentioned, the radii of proton and neutron are equal. In this case the difference of electrostatic energies is:
by setting the difference of electrostatic energies equal to the mass difference of proton and neutron multiplied by we obtain:
Figure 1. Quark models of neutron and proton.
Calculating we used the constants from  and the radius of proton was taken from .
Thus, we have:
Neutron and proton masses taken from  are:
One can see that the calculated mass difference for proton and neutron is approximately equal to the experimental value; however, the latter is four times greater. It is natural because in the calculations of electrostatic energy we considered the configuration with maximal distances between quarks. The result obtained confirms adequacy of the model.
3. Algorithm for Calculating the Mass Difference for Neutron and Proton
For obtaining a result consistent with experimental data on the mass difference for neutron and proton, it is necessary to perform calculations by the following scheme:
1) A value of radius from the set is chosen, which, being overwhelmed, results in switching on the strong coupling.
2) Three random numbers from the range [0, 1] are generated. The first number is the reduced radius in a spherical system of coordinates (with the origin positioned at the center of nucleon), the azimuth angle is , where is the second random number, and the polar angle is , where is the third random number (the Monte-Carlo method  ). The Cartesian coordinates of quarks are determined by the standard formulae:
3) From these coordinates, calculate the distances between quarks by the standard formulae:
4) The probability of quarks to be separated by certain distances is modelled by the expression:
The corresponding plot is presented in Figure 2.
5) If inequality holds for the separation between quarks then the probability of quarks to have this separation is calculated by Formula (5). Then the range [0, 1] is divided into two segments and and next random number is generated; in the case this value of distance is left for further calculations, if then the corresponding radius is neglected.
6) The value of electrostatic energy is calculated by using the distance between quarks.
7) The number of such tests should be sufficiently large, the average electrostatic energies of neutron and proton and are determined by the formulae given below.
8) When the average energies of neutron and proton become stable, the mass difference is calculated by the formulae:
and are determined as follows:
In calculating the electrostatic energy of neutron the first particle is taken u-quark, in the case of proton it is d-quark.
4. Analysis of Calculation Results in the Free Quark Model
For test problem we consider the free quark model, in which the probability to find quark at any point of nucleon is equal to unity. If the model is valid then the calculated mass difference for neutron and proton should be closer to an experimental value then it follows from qualitative analysis.
The average electrostatic (Coulomb) energy was calculated by the algorithm given above (except for the items 1, 4) for the case of neutron and proton in five test series for each particle. Each series included 105 tests. Calculation results for potential (Coulomb) quark energy in proton and neutron are presented in Table 1 and Table 2.
The first column indicates the number of test in a series, the rest columns show the average Coulomb (potential) quark energies in proton.
Analyzing the results from Table 1 one may conclude that the average potential energy of quarks in proton varies around zero value, hence we may assume that the average Coulomb energy of quarks in proton is .
The first column indicates the number of test in a series; the rest columns show the average Coulomb (potential) energies of quark in neutron.
Figure 2. Probability distribution for distances between quarks in the model taking into account interaction between quarks.
Table 1. Average Coulomb energy of quarks in proton.
Table 2. Average Coulomb energy of quarks in neutron.
for all series .
The average value of potential energy of quarks in neutron over the five test series is and the maximal deviation from the average value is .
Using the parameters and from Formula (6) one can find the mass difference for neutron and proton:
The experimental mass difference for neutron and proton discussed above is:
The difference between the experimental and calculated mass difference for neutron and proton in the free quark model is:
From calculations performed above one can see that even a simplest model of free quarks yields satisfactory (13%) agreement between experimental and calculated of mass difference for neutron and proton. Below we consider a more realistic model, which makes allowance for strong (gluon) quark coupling.
5. Analysis of Calculation Results in the Model of Strong Coupling Quarks
We have presented calculation results for the mass difference of neutron and proton under the assumption that quarks have equal probability to be at any point inside nucleon. This simplified model is not adequate yet. According to modern view, at small distances between quarks they behave as free particles (asymptotic freedom); however, at longer distances, strong (gluon) coupling starts, which prevents quarks from escaping nucleon. Strong quark coupling is modeled in Section 2. The calculation results are given below.
The potential (Coulomb) energy of quarks in proton and neutron was calculated by the Monte-Carlo method in 5 series, 200,000 tests in each. However, in Table 3 and Table 4, the only tests are presented that satisfy the conditions discussed in Section 2. Hence, the number of tests in each of the series given in Table 3 and Table 4 is less than the total number of tests.
The first column indicates the number of test in a series; the rest columns show the average Coulomb (potential) energies of quark in proton.
Table 3. Average Coulomb energy of quarks in proton at .
Table 4. The dependence of electrostatic contribution to the mass of the neutron from the radius of strong interaction.
Line 1—radius line that involves strong (gluon) interaction, Line 2—medium value of coulon neutron energy at different interaction radius values, Line 3—electrostatic neutron mass.
From Table 3 one may conclude that the potential energy of quarks inside proton oscillates around zero value. Calculation results for potential energy at other values yield similar results. Thus, one can assume that the potential energy of quarks inside proton is zero, similarly to the case of free quark model.
Table 4 presents the average Coulomb energy and mass of neutron versus the distance between quarks, starting from which “asymptotic freedom” vanishes and strong (gluon) coupling starts preventing quarks from escaping nucleon.
Figure 3 presents plot of data from Table 4. One can see that the average Coulomb energy of quarks monotonically falls with an increase in the radius of quark interaction . By interpolating dependence to the value of corresponding to the experimental mass of neutron we find that to this value of mass corresponds the radius (Figure 4).
From Table 5 one can see that the values of average quark Coulomb energies in neutron in five series coincide with the average value within the error of less than 0.5%. The value can be used for calculating the mass difference for neutron and proton by Formula (6):
Table 5. Average Coulomb energy of quarks in neutron at .
Figure 3. Average potential energy of quarks in neutron.
Figure 4. Average Coulomb energy of quarks in neutron versus the radius of interaction . Dotted line shows the average value of Coulomb energy of quarks in neutron corresponding to the experimental value of neutron mass.
Thus, the results of Monte-Carlo calculation for the mass difference of neutron and proton coincide with experimental data to within 0.78%.
The Monte-Carlo method used for calculating average Coulomb energies of quarks in neutron and proton made it possible to calculate the mass difference for neutron and proton. In addition to the quark distribution used in this work, one can consider other distributions, for example: or . By using various quark distributions in a nucleon, one may calculate observable nucleon parameters and comparing the results with experimental data makes a conclusion about nucleon structure. It would not be correct to employ the method suggested for calculating mass difference of other baryons because of their short lifetime, which makes it impossible to obtain the needed statistics.