Is 27.2mm seat post stronger than 25.4mm because it has bigger diameter?
Yes.
How to mathematically calculate how much 27.2mm stronger than 25.4mm provided both seat posts have same length, wall thickness and made of same metal?
Firstly, a 27.2mm seatpost is heavier than a 25.4mm seatpost having the same wall thickness. Specifically, it has 1.0709x times the weight. This fact that there's more material strongly suggests (but does not prove) that it's stronger.
A beam with a certain bending moment M (defined as force times the lever arm at which the force acts), radius r and second moment of area I has the maximum stress:
sigma = M*r/I
So we need to know the second moment of area.
For a tube, it is
I = pi/4 * (r_2^4 - r_1^4) = pi/4 * (r_2 - r_1) * (r_2^3 + r_2^2*r_1 + r_2*r_1^2 + r_1^3)
= (approximately) pi*(r_2 - r_1)*r^3
Here r_2 - r_1
is the wall thickness and r
is the approximate radius (inner or outer, doesn't matter, as they differ only very little from each other).
So the maximum stress is:
sigma = M/(pi*(r_2 - r_1)*r^2)
Here everything else is constant but r
differs. It is 1.0709 times bigger in the bigger seatpost. So the bigger seatpost has 1/1.0709^2 = 0.872
times the stress. It's about 15% stronger.
However, the bigger seatpost is also 7% heavier. Nevertheless, because the strength differs more than its weight, it is still stronger per unit weight.
If i have to use 25.4mm seat post how i calculate ideal wall thickness i need so it be as strong as 27.2mm? for instance 25.4 with 1.5mm thick walls is same strong as 27.2mm with 1mm thick walls? Is there formula to calculate exactly?
With same wall thickness the larger seatpost is (27.2/25.4)^2
times stronger. So you need (27.2/25.4)^2 = 1.1468 = (approximately) 1.15
times thicker walls to make it of equal strength.