blob: ae83be9c8222bcdc61014acd01eb227446c6ad9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
////
//Variable Declaration
aH = 40 //Number of heads
N = 100 //Total events
//Calculations
aT = 100 - aH
We = factorial(N)/(factorial(aT)*factorial(aH))
Wexpected = factorial(N)/(factorial(N/2)*factorial(N/2))
//Results
printf("\n The observed weight %5.2e compared to %5.2e",We,Wexpected)
|