# Chapter 13 : Introduction to statistical thermodynamics¶

## Example 13.1 page no : 474¶

In [1]:
# Variables
p1 = 1./6;			#probability for the first throw gives 6
p2 = 1./6;			#probability for the first throw gives 5
n = 2;	    		#the no.of dice are two

# Calculations
p = p1*p2*n;			#the required probability is

# Result
print 'the required probability is %3.2f'%(p)

the required probability is 0.06


## Example 13.2 pageno : 474¶

In [1]:
# Variables
p1 = 4./52;			#the probability for getting ace in first draw is
p2 = 3./51;			#the probability for getting ace in second draw is
p3 = 2./50;			#the probability for getting ace in third draw is
p4 = 1./49;			#the probability for getting ace in fourth draw is

# Calculations
p = p1*p2*p3*p4;			#total probability is

# Result
print 'total probability is %3.9f'%(p)

total probability is 0.000003694


## Example 13.3 page no : 475¶

In [3]:
# Variables
n = 12.;			#no.of particles
n1 = 8.;
n2 = 4.;

# Calculations
p = n*(n-1)*(n-2)*(n-3)/(n2*(n2-1)*(n2-2)*(2**n));			#probability of distribution (8,4)

# Result
print 'probability of distribution 8(4) is %3.5f'%(p)

probability of distribution 8(4) is 0.12085


## Example 13.4 page no: 475¶

In [10]:
# Variables
m = 32;			#mass of the oxygen molecule in gm
n = 1.67*10**-27;			#mass of one electron
k = 1.38*10**-23;			#boltzzmann consmath.tant in ergs/cal
t = 200;			#temperature of the oxygen in K
c = (100.+101)/2;			#average speed of the oxygen molecule in m/s

# Calculations
a = m*n/(2*3.14*k*t);
p = 4*3.14*(a**(3./2))*(c**2)*(2.303**(-a));			#probability that the oxygen speed is lies between in m/sec

# Result
print 'probability that the oxygen speed is lies between is %3.6e m/sec'%(p)
print "Note : answer is slightly different because of rounding error."

probability that the oxygen speed is lies between is 6.867794e-04 m/sec
Note : answer is slightly different because of rounding error.