1 - PMK - hobbies

advertisement
1. The program makes it possible to:
a. generate samples in accordance to a normal (Gauss) distribution;
b. generate samples which are correlated to previous generated samples;
c. determine statistical parameters of these samples, such as:
i. minimum,
ii. maximum,
iii. average,
iv. standard deviation,
v. correlation coefficient;
d. write these samples to txt files in directory Generator of Samples/Files at
first fixed local disc;
e. determine expected and real distribution of original and correlated samples;
f. count 2 Pearson statistics for generated samples in order to check if distribution of
these samples is according to normal (Gauss) distribution;
g. determine amount of analogous elements of original and correlated samples whose
absolute value of difference equals n;
h. count up the proportion of such analogous elements of original and correlated
samples that their absolute value of difference isn’t greater (P1) or smaller (P2)
than n;
i. determine a list of pairs of correlated samples and their statistical parameters;
j. perform actions described at points d-h for every pair of samples from this list;
k. write statistical data concerning pairs of samples from this list down to txt file in
directory Generator of Samples/Files at first fixed local disc.
2. Use.
The program consists of 4 tab control: Generate Samples, Distribution, Discrepancies between
correlated samples and Statistics.
In order to generate a sample according to normal distribution you should establish average,
standard deviation, minimum and maximum as you wish sample to have. Moreover, you
should determine amount of elements of the sample. Next you can click on the button
“Generate Sample”. Then it will generate the sample whose statistical parameters: minimum,
maximum, average and standard deviation are as set previously.
If you generate a first sample you can generate a second sample which is correlated to first
sample. You can’t determine a correlation coefficient in programme, but you can determine
a standard deviation of elements of the second sample from elements of the original sample.
The algorithm generates the second sample in such way, that if S1[0],...,S1[n-1] are elements
of the first sample and S2[0],...,S2[n-1] are elements of the second samples, then the random
variable consisting of elements: S1[0]-S2[0],...,S1[n-1]-S2[n-1] has normal distribution of
average=0 and empiric standard deviation equal the standard deviation. There is an obvious
correlation between the standard deviation and the correlation coefficient. The greater the
standard deviation is, the smaller the correlation coefficient. For example, if you wish the
correlation coefficient between the first sample, visible above, and the second sample to be
equal to approximately 0,9 you should set the standard deviation to be equal to approximately
7,2. If you wish the range of the second sample to be included in the range as you had
established before you generated the first sample you should check radio button “try not to
exceed of range”. You may generate a second sample clicking on the button “Generate
Correlated Sample”.
After generating two correlated samples, in the second tab control “Distribution” you can see
distribution of these samples. It will be enough if you click on the button “Determine
expected and real distribution of original and correlated samples”. Here you can also
determine 2 Pearson statistics for these samples. The program also displays messages about
minimal amount of elements of samples in order to use the Pearson compatibility test.
Also after generating two samples you can see discrepancies between these two samples by
clicking on the button “Determine parameters, concerning discrepancy between correlated
samples” in third tab control “Discrepancies between correlated samples”.
Finally, in tab control “Statistics” you can generate a series of pairs of correlated samples of
statistical parameters as you wish, according to normal distribution, of course. After correct
filling of all writeable fields you can generate a series of pairs of correlated samples by
clicking on the button “Generate pairs of correlated samples”. I suggest establishing an
amount of elements of all samples to be equal to at least 1500. Otherwise the program will
generate pairs of samples such, that the correlation coefficient between samples of pairs will
vary a lot. The progress bar indicates progress of execution of the task. Time of realization of
the task depends on the amount of elements of first pair of samples, amount of pairs of
samples and step. Writings: cor, dev1, dev2, dist1, dist2, ave1, ave2, max1, max2, min1,
min2, t1, t2, P2, n mean correlation coefficient between samples from pairs, standard
deviation of first and second sample, statistics 2 Pearson statistics for first and second
sample, average of first and second sample, maximum and minimum first and second sample,
time of generating of first and second sample, P2 from third tab control “Discrepancies
between correlated samples” and amount of elements of samples respectively.
In columns min, max, average and deviation are minimum, maximum, average and standard
deviation of all mentioned above parameters of all generated samples. If you click on some
element of list of generated pairs of samples, the statistical parameters of the pair of samples
will appear in first column.
If you click on the button “Write statistical data to txt file”, the programme will write all
mentioned above statistical parameters of all generated pairs of samples.
Next you can also check what elements the selected pair of samples consists with and you can
also see statistical parameters this pair of samples in tab control “Generate Samples”, clicking
on the button “Show selected pair of samples from statistics”. Of course, statistical parameters
of these samples occurring here in this tab control are identical to analogical statistical
parameters of these samples occurring in tab control “Statistics”.
Moreover, you can also see distributions of samples of selected pair, clicking on the button
“Determine expected and real distribution of original and correlated samples” in second tab
control “Distribution”. Of course you may determine 2 Pearson statistics for these samples.
You can also see discrepancies between samples from selected pair, clicking on the button
“Determine parameters concerning discrepancy between correlated samples”.
Download