0% found this document useful (0 votes)
12 views5 pages

Zar Raporu 3

The document examines frequency and probability by rolling two dice different numbers of times and plotting the results. It defines frequency and probability, and shows that as the number of rolls increases, the results approach the theoretical probabilities. Figures show the results of rolling dice 50, 1000, 10000, and 10 million times.

Uploaded by

erdogangunes99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

Zar Raporu 3

The document examines frequency and probability by rolling two dice different numbers of times and plotting the results. It defines frequency and probability, and shows that as the number of rolls increases, the results approach the theoretical probabilities. Figures show the results of rolling dice 50, 1000, 10000, and 10 million times.

Uploaded by

erdogangunes99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Results

Figure 1: 50 times rolled dice

Figure 2: 1,000 times rolled dice

1
Figure 3: 10,000 times rolled dice

Figure 4: 10^7 times rolled dice

2
2. Conclusion
This report examines frequency and probability by rolling two dice, 50, 1000, 10000,
and 10^7 times, which can be counted infinite. Firstly, probability and frequency concepts must
be explained.

Measuring of how many times an event occurs on average during a unit of time is
defined as frequency. In frequency observation, finite times observation/experiment is made.
Probability is a branch of mathematics that measures possibility of a particular event occurring,
but n number of experiments should tend to ∞. To make engineering calculations easier,
frequency taken as probability. Because of that certain minimum n number of observations
considered as infinite. Companies and researchers use advantage of this situation because more
experiment is more time consumer and expensive.

As seen in figures, as the number of rolls increases and tends to infinite, a more linear
graph emerges, and it approaches probability. In smaller repeat numbers, frequency can be
observed, but if the repeat number is big enough, probability can be observed as seen in Figure
4.

3
3. Appendix

clc;
clear;
N=input('Enter the number of times to roll the dice \n')
%Defines how many times the dice are rolled
A=randi([1,6],1,N); %Dice 1: It assigns a random number
between 1-6 50 times and prints it into a [1,50] matrix.
B=randi([1,6],1,N); %Dice 2
C=A+B; %Sum ups the values on the two dice
A1=0; %Sums that equal to 2
A2=0; %Sums that equal to 3
A3=0; %Sums that equal to 4
A4=0; %Sums that equal to 5
A5=0; %Sums that equal to 6
A6=0; %Sums that equal to 7
A7=0; %Sums that equal to 8
A8=0; %Sums that equal to 9
A9=0; %Sums that equal to 10
A10=0; %Sums that equal to 11
A11=0; %Sums that equal to 12
for c=1:1:N %Runs a for loop between 1 and N
if C(1,c)==2 %Transfers values ??between 1 and N whose
sum is 2 to A1.
A1=A1+1;
elseif C(1,c)==3 %Transfers values ??between 1 and N
whose sum is 3 to A2.
A2=A2+1;
elseif C(1,c)==4 %Transfers values ??between 1 and N
whose sum is 4 to A3.
A3=A3+1;
elseif C(1,c)==5 %Transfers values ??between 1 and N
whose sum is 5 to A4.
A4=A4+1;
elseif C(1,c)==6 %Transfers values ??between 1 and N
whose sum is 6 to A5.
A5=A5+1;
elseif C(1,c)==7 %Transfers values ??between 1 and N
whose sum is 7 to A6.
A6=A6+1;
elseif C(1,c)==8 %Transfers values ??between 1 and N
whose sum is 8 to A7.
A7=A7+1;
elseif C(1,c)==9 %Transfers values ??between 1 and N
whose sum is 9 to A8.
A8=A8+1;

4
elseif C(1,c)==10 %Transfers values ??between 1 and N
whose sum is 10 to A9.
A9=A9+1;
elseif C(1,c)==11 %Transfers values ??between 1 and N
whose sum is 11 to A10.
A10=A10+1;
elseif C(1,c)==12 %Transfers values ??between 1 and N
whose sum is 12 to A11.
A11=A11+1;
end
end
X=2:12; %Defines the x-axis of the graph (sums of 2 dice).
Y=[A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11]; %Array that
defines how many times the sums between 2 and 12 occur.
plot(X,Y,'-o') %Graph
xlabel('Repeat')
ylabel('Cast Dice Summation')
grid on
box on

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy