[Thermal Physics] Stirling approximations

Is there a more sophisticated way mathematically to find percentage errors in some stirlings approximations other than plugging numbers in and doing it the old fashioned way?

π︎ 17
π°︎ r/PhysicsStudents
π¬︎
π€︎ u/Arcanus94
π︎ Jan 21 2021
π¨︎ report
The best way to introduce Stirling's Approximation
π︎ 148
π°︎ r/textbookhumour
π¬︎
π€︎ u/itiswhatitis626
π︎ Oct 24 2020
π¨︎ report
Stirlingβs Approximation
π︎ 2
π°︎ r/u_12_Semitones
π¬︎
π€︎ u/12_Semitones
π︎ May 28 2020
π¨︎ report
Stirling Approximation and Binomial Coefficients

Hey all! I'm having difficulty with how my professor gets to an answer.

The question I'm facing is this.

The answer I'm given is here.

The k is a term from thermodynamics, but the rest ofd the math I get, to a degree. What I am lost on is how the answer reaches is the second term of Na/N ln(Na/N), because from my answer I get this.

How do I combine the first two ln(_) terms in my answer?

π︎ 2
π°︎ r/MathHelp
π¬︎
π€︎ u/whymusticarryon
π︎ Nov 04 2019
π¨︎ report
[PDF] Elementary proof of the Stirling Approximation Formula cs.pwr.edu.pl/cichon/Mathβ¦
π︎ 32
π°︎ r/compsci
π¬︎
π€︎ u/eeojun
π︎ Aug 05 2017
π¨︎ report
Any good approximations for Stirling numbers? math.stackexchange.com/quβ¦
π︎ 2
π°︎ r/math
π¬︎
π€︎ u/koormoosh
π︎ Sep 29 2016
π¨︎ report
Can someone help me understand Stirling's Approximation for n!?

I just went through the limits/series/sequences unit of a pre-calculus high school course, and one of the extra credit questions on a test asked for $\lim_{n\rightarrow\infty}\frac{\sqrt{2\pi x}(\frac{n}{e})^n}{n!}$.

According to Wikipedia and MathWorld, the expression evaluates to 1. I can prove this to myself empirically by looking at the graph of the function, but I can't understand how students with our math background were expected to figure this out.

Were we supposed to simply plug in successively larger values for n, or was there some method within our abilities? Post any possible solutions, and I'll answer with whether or not we had that knowledge to work with, I guess.

EDIT: comments caught me being silly and messing up the expression.

π︎ 3
π°︎ r/math
π¬︎
π€︎ u/jabagawee
π︎ Dec 14 2009
π¨︎ report
what is a non-pure-mathematics application of stirling's approximation

Is there an application of Stirling's Approximation? I can't see that Stirling's Approximation would be useful computationally for positive integer values of the Gamma Function. I can't see why even for large non-integer inputs that Stirling's Approximation would be useful. Despite it's accuracy as n! grows, it's absolute error grows as well (ie (.5% of 1000 > 10% of 100). Therefore, it could only give a ball park value of n!, for which an average of the closest integer values of n! might do equally well.

Is Stirling's Approximation general for complex values of Gamma; and therefore; avoids calculating a potentially nasty integral? What is it's practical use?

π︎ 3
π°︎ r/math
π¬︎
π€︎ u/AndersonkKupper
π︎ Sep 21 2014
π¨︎ report
Stirling's approximation in Clojure threebrothers.org/brendanβ¦
π︎ 7
π°︎ r/programming
π¬︎
π€︎ u/abscondment
π︎ Nov 25 2010
π¨︎ report
Stirling's approximation in Clojure threebrothers.org/brendanβ¦
π︎ 2
π°︎ r/math
π¬︎
π€︎ u/abscondment
π︎ Nov 25 2010
π¨︎ report
Stirling's approximation in Clojure threebrothers.org/brendanβ¦
π︎ 7
π°︎ r/Clojure
π¬︎
π€︎ u/devslashnull
π︎ Nov 25 2010
π¨︎ report
Help with Factorials and Stirling's approximation

I'm trying to verify N!/[2^N * (N/2+l)! * (N/2-l)!] ~ (e^((-l^2)/N))/(pi*N/2)^(1/4) Where N is even, and l = -N/2,..., N/2 It was suggested to me to use Stirling's Approximation which got me somewhere, just not where I need to be... I'd really appreciate some help.

π︎ 3
π°︎ r/learnmath
π¬︎
π€︎ u/raistlin7390
π︎ Mar 01 2011
π¨︎ report
First Proof of Polyas Recurrence Theorem?

I am currently searching for the first proof using Stirling Approximation and enumerating the paths to obtain that the probability that a one dimensional random walker returns to the point is 1 (i.e. it recurrent). I have seen numerous sites go over how the probability = ^(2n)Cn 4^n which approximates to 1/sqrt(pi * n), which diverges. But it would be of great help if someone could point me to who first proved the recurrence of 1 dimensional random walks with this method

π︎ 2
π°︎ r/learnmath
π¬︎
π€︎ u/After_Home_452
π︎ Aug 26 2020
π¨︎ report
Can someone point out my mistake?

Its the second exercise here if that's easier. https://mathigon.org/course/intro-probability/common-distributions (click 'reveal all steps' at the bottom to scroll down)

ExerciseStirling's approximation allows us to more easily manipulate factorial expressions algebraically. It says that: lim n--> inf (n! / ((n/e)^n * sqrt(2pi*n))) = 1

Suppose that n is even and that p=1/2. Use Stirling's approximation to show that sqrt(n) times the probability mass assigned to 0 by the distribution Binomial(n, p) converges to a finite, positive constant as n --> inf. Find the value of this constant.

So if I'm understanding correctly the probability mass assigned to 0 by the distribution is the value P(0 successes) = (nC0) * (p)^0 * (1-p)^n = (1/2)^n. So the limit that we're looking for is sqrt(n) * (1/2)^n as n --> inf which can be shown to be 0 using L'hopitals. If we want we can make the substitution n = 2t to account for the fact that n is even but the limit is the same. What am I doing wrong? I feel like I'm misunderstanding "probability mass assigned to 0" because the solution provided is computing (nC(n/2)) * (p^n/2) * (1-p)^n/2 = (nC(n/2)) * (1/2)^n. It seems like this should be the probability that we'll have n/2 successes which would be the middle of the distribution(as opposed to 0) and the max value of the probability mass. The solution is in the link above if anyone wants to look at it. Any help is appreciated.

π︎ 5
π°︎ r/learnmath
π¬︎
π€︎ u/drmantist123
π︎ Jul 04 2020
π¨︎ report
Entropy of a Fire Emblem game

# What is Entropy?

Yes, we're going to talk seriously about entropy.

You may have heard it defined as a measure of disorder (or even more sensationally, a measure of chaos). That's a bit misleading, and not just because of the negative connotations of both words. It's more a measure possibility, a measure of what could be, a measure of dreams. Indeed, the formal definition of entropy is S = k ln(Ξ©) where S is the entropy (because calling it a letter not in the word is logical, apparently), Ξ© is the number of possible states (even more logical, because Greek, right?), and k is just a constant that doesn't really matter for our purposes, but I'll let it equal 1/ln(2) bits in this writeup^(Footnote 1). Notice, then, that entropy depends on nothing but the number of possible states of our system, and as we have more possible states, we have more entropy

"Possible state" is a bit vague, however. Possible out of... what? This vagueness is why, in my opinion, entropy is most intuitive from a statistical mechanics point of view: you only care about whole ensembles of identical systems, rather than any single given system (which, of course, has only a single definite state). And we get to define what makes two systems identical. For example, how many ways are there to arrange N gas molecules in a box of volume V with energy E (we won't hold, for example, the pressure constant; we can let that be what it will)? If you have a couple zillion of these boxes, just look at all of them and count them up^(Footnote 2)! That's the kind of thing we do in physics and math, look at infinite numbers of things.

Oh, but this is a Fire Emblem sub, so let's talk about Fire Emblem. Besides, it's easier to think about characters on a tile grid than particles in continuous boxes. (Even in classical stat mech, you're forced to quantize space seemingly arbitrarily, even without quantum mechanics. But I digress. ...Not that this whole post isn't a terribly weird digression.)

# Entropy of Oversimplified Barebones Fire Emblem

Let's first strip down a lot of the features to make this easier to deal with. Let's have four different weaponless, skillless units on our side and four different weaponless, skillless units on the opponent's side. And let's put them on, say, a small 6-by-8 board. (Sound familiar?) And let's have every square be have plain old land terrain. Let's call

... keep reading on reddit β‘

π︎ 153
π°︎ r/fireemblem
π¬︎
π€︎ u/Viola_Buddy
π︎ Mar 03 2018
π¨︎ report
Unexpected pi in probability - the odds that, if you throw 2N coins, exactly N will be heads and N will be tails

The odds that, when you toss 2N fair coins, exactly N will be heads and N will be tails, is:

(2N)! / [(N!)^2 2^(2N)]

Asymptotically, when N is large, this is approximated by:

1 / sqrt(pi N)

(This can be proven using Stirling's approximation of the factorial. I don't if it can be directly related to circles.)

(One might also be able to relate it to the Wallis product. I don't know.)

π︎ 38
π°︎ r/3Blue1Brown
π¬︎
π€︎ u/columbus8myhw
π︎ Jan 14 2019
π¨︎ report
[Request] My friend wanted to see how lazy Dr. Strange is.

My friend posted this on facebook, is it solid?

"With the help of my friend Bob, we have now obtained the formulas for all of the possible (post-snap) alternate realities that Dr. Strange would have had to analyze to search for that one possible way of victory. Side note- although Strange stated he looked into 14,000,604 futures, he did not state that he looked into all of the possible futures.

Thanos snap kills 50% of the universe's population at random. It is key to note that, while this is random and NOT predetermined, the 50% is forced. Therefore, we can use the combination equation C = n! / r! * (n - r)! to calculate the total alternate realities created by the snap that Strange would have had to delve into to see if victory lied on that path. Bob made the determination that the population of the Star Wars galaxy would have to be sufficient as a stand-in for the population of the Marvel universe. As such, 100 quadrillion, or 10^17, is the population size we used. Obviously, half of that is our target population.

Therefore, the total alternate realities that Strange would have had to look into to find all the paths for victory would have been 10^17!/((510^16)!(10^17-(5*10^16))! ... I don't have a scientific calculator anymore and the calculators online won't process that complex of a problem. I know I could use Stirling's approximation of factorials.. but I'm tired. So! If anyone wants to figure out how lazy Dr Strange was, figure out that equation!"

π︎ 3
π°︎ r/theydidthemath
π¬︎
π€︎ u/TheMicaera
π︎ Apr 05 2019
π¨︎ report
Finding an Inverse of Restricted Gamma Function

Hey everyone, I don't know/haven't used LaTeX yet but I'll do my best to keep it simple,

I'm working on my undergrad senior project and I'm trying to find an inverse function for f(x)=(x-1)! just in the positive reals. I was inspired to ask this question when in one of my probability classes my professor talked about how something like Ο! existed. Now, obviously, this isn't a 1:1 function so an inverse doesn't exist, but I first restricted the function just to x > 0 and then restricted it further after finding the minimum which is x=1.461632... or the positive root of the digamma function. You can see what I mean on this graph . After restricting the domain to x>1.461632... , the function is 1:1 and an inverse does exist.

This is where I'm stuck at.

I guess what I'm asking is that is there a way to find this inverse? I know that, for example, f^(-1)(120)=5 and f^(-1)(3(βΟ )/4)=2.5 but what of something like f^(-1)(25) or f^(-1)(e)? I've seen things like Stirling's Approximation and finding an inverse based off of that but I wanted to see if anybody else has any ideas of what I can do next.

Thank you for your time and let me know if you have any questions about my post.

π︎ 2
π°︎ r/math
π¬︎
π€︎ u/Wrienchar
π︎ Jan 31 2019
π¨︎ report
My journey to finding a faster algorithm for integer factorization. (Long post)

Hi guys I am a senior in high school and I got into math a few years ago. I was fascinated in finding huge prime numbers, and I ran a computer algorithm to find them ( the Lucas-lehmer-Riesel test). Well, I wanted to find out how it works so I taught myself modular arithmetic, which I'm pretty good at.

So I was messing around with different polynomial equations one day trying to find patterns in prime numbers, and I actually managed to independently discover Fermat's factoring method by looking at functions of the form x^2 -c^2 for constant c and finding a pattern in their factors. So I found an algorithm to put numbers in this form, and that is how I independently discovered Fermat's factoring method. From then on I became interested in factoring algorithms after I discovered no fast ones exist for general numbers.

As much as I tried, I could not get myself to understand the newer factoring algorthms- quadratic sieve, number field sieve, much to my frustration. So I sought out my own methods that high school me could understand.

I came across the method I have been researching by looking at residues of fermat's little theorem. My thought was that if fermat's little theorem could determine a number to be prime, it could determine the factors as well, and the factors were hidden somewhere in the residue. So I whipped up a computer program to output a ton of residues and search for patterns but I was of course wrong. However I did spot patterns.

I noticed that factorials "magically" revealed factors of numbers when they would pop up randomly in the residues they would factor the number.

If n! is between the factors of a number then it would factor the number with a gcd algorithm. The size of the numbers to factor would be about 300 digits long. Even more interesting, the gcd algorithm tells us if n! is larger or smaller than the factors if it doesn't find factors. So a logarithmic run time binary search can be used. This along with the fact that gcd () has a run time of log(x) means my algorithm has a log^2 (x) run time assuming we can find n! mod p efficiently. p is the number to be factored which is around 300 digits or more so it can compete with cuttent factoring algorithms. The n! Mod p is the first step in computing gcd (n !, p) using the extended Euclidian, and also the hardest step. Then all other steps will be trivial as n! mod p < p, and so the size of both inputs is no larger than p.

The best algorithms out there for finding n! Mod p do

... keep reading on reddit β‘

π︎ 37
π°︎ r/math
π¬︎
π€︎ u/wcb98
π︎ Apr 21 2016
π¨︎ report
Just how big is 9!!!!!!!!!!!!!!! (fifteen factorials) ?

There was a contest in my math class a few years ago, to write a function with the highest numerical value in under 10 seconds. I wrote the title question, but a classmate of mine did 99^99^99^99, while another did 9^9^9^9^9^9^9. After checking on a big number calculator, (http://www.calculator.net/big-number-calculator.html) 9!! was already larger than 99^99^99^99. I assume this is true for 9^9^9^9^9^9^9 as well. I'm still curious though. Just how large was my answer? I used a computer and Stirling's approximation ( ln N! = N ln N - N ) to figure out how many digits are in 9!! (approximately 1,859,930). I cannot find any reasonable way to continue this with 9!!! though, as my computer cannot handle a 2 million digit input.

π︎ 10
π¬︎
π︎ Apr 13 2018
π¨︎ report
Why dont we have a limit for Pi that is based on a non infinitary number of terms?

We have a limit for e equal to (1+1/n)^n where n->Infinity Which shows that exponentiation is much stronger than division. But not by a lot since e is only around 3 times unity.

Is there a similar limit for Pi. If not, is it proves to be impossible to design a product or sum < x terms that equals to Pi without resorting to explicit use of Pi or trigonometric functions?

Having seen Stirlings Approximation I have been wondering if a simple asymptopic formula exists.

I also have been wondering about sums and products that range over the primes instead of naturals or combine use of both. What would the limit formula for e equal if the 1/n were 1/p_n instead? Or the exponent? Do we have notions of derivatives or integrals that range over functions rather than single variables? It seems to me that learning the relative growth of functions at 0 1 and infinity wl help me with much more complex and real analysis later. After all, it seems that these flavors of growth are merely energies to play with and combine to form results. Some of the formulas Ramanujan crafted are just out of this world...his intuition was definitely guided by an intuitive understanding of the relative values of functions quite specifically to an insane degree.

π︎ 3
π°︎ r/learnmath
π¬︎
π€︎ u/xkcdfanboy
π︎ Jun 27 2016
π¨︎ report
A simple inequality, and how it lead me to a problem which took fifty years to solve.

I had just started reading a book on inequalities (link at the end), and on page 17 I encountered the following problem:

Show that, for all positive integers n,

[; \frac{1}{\sqrt{4n+1}} &lt; \frac{1}{2} \cdot \frac{3}{4} \cdot \frac{5}{6} \cdot \,\cdots\, \cdot \frac{2n-1}{2n} \leq \frac{1}{\sqrt{3n+1}}. ;]

Can you improve this approximation?


If you'd like to do this problem yourself, you should ignore my post in r/cheatatmathhomework where I give a solution. There are a couple different ways to do it that I see, so after you've found one you should try finding another!

Now, what interested me was the challenge to improve the approximation. After staring at the bounds for a long time with no results I decided I it might be helpful to take a break and look at a plot of the situation (the product in the middle of the inequality was made continuous by using the gamma function). The upper bound seemed pretty good, but the lower bound definitely had room for improvement. So I put my years of experience to work and... started plugging in numbers at random to see what would happen.

In these plots I change where we are on the n-axis a bunch so don't be alarmed.

• (4*n + 1)^-1/2 - This is the lower bound from the original problem. Let's see if we can narrow that gap.

• (3.5*n + 1)^-1/2 - Hey that's a little better. Can we go further?

• (3.1*n + 1)^-1/2 - Oh, that's too much, it crosses the blue line. Increase it a little bit...

• (3.2*n + 1)^-1/2 - Hmm, so 3.1 is too low but 3.2 seems to be fine this far out... could it be?

• (Pi*n + 1)^-1/2 - Now I'm on to something. Whenever you see Pi you know it wasn't an accident.

So, can I prove it? Preliminary investigation of bounds of the form (c*n + 1)^-1/2 showed that my method for verifying the original inequality could do no better than the given (4n + 1)^-1/2 , so I was out of luck there. Try and try as I might, I just couldn't seem to get the result to fall out, and I had a gut feeling that a proof of this new lower bound would require some heavy machinery. It was at this point that I posted the question to r/cheatatmathhomework in the hopes that someone would have something applicable in their toolbox. Liberalkid suggested using Sti

... keep reading on reddit β‘

π︎ 151
π°︎ r/math
π¬︎
π€︎ u/acetv
π︎ May 10 2011
π¨︎ report
Help with statistical thermodynamics

You are moving on a line, one step at a time. You decide on the direction of each step by tossing a coin: head means right, tails means left.

1. How many distinct trajectories are possible after N steps?
2. What is the chance that you are where you started after 10^4 steps?
3. How many unique trajectories are there that displace by an integer m steps to the right after N total steps?
4. Calculate the above answer with Stirling's approximation, with N = 10^4 and m = 100.
5. Express probability p(N,m) to displace by m steps after N total steps as a function of m and N. Assume that m>0 means displacement to the right and m<0 means displacement to the left.
7. Calculate the expectation value (or mean value) of m after N steps.
8. Do the above with m^2.
9. Now assume that N>>1, m>>1, and m<<N. Apply Stirling's approximation and Taylor series to identify the functional dependence of p(N,m) on m. Don't worry about normalization.

Sorry about the flood of potentially very simple questions - I'm joining late to a class and am frantically doing practice exams to catch up. Even if you can only answer a few of the questions it would be very helpful. Thanks!

π︎ 3
π¬︎
π€︎ u/person1996
π︎ Feb 27 2017
π¨︎ report
Hi, I'm an amateur trying to think in googological terms

So on my Mathematical Induction(yes, I'm high school level, doesn't stop me from trying) class, teacher needed a 6 to complete the divisibility. So she pointed towards the term with "6!!!!!". So I worked on the value of ((((6!)!)!)!)! (Afterwards I found out about multifactorial, but that's just 6Γ(6-5) = 6 which is boring).

I figured I can't find the exact value and I didn't know the Stirling's approximation at the time so I tried to find a upper and lower bound of it.

n! = nΓ(n-1)Γ(n-2)Γ...Γ1 Β  < nΓnΓnΓ...Γn = n^n = nββ2 Β  β΄ ((((6!)!)!)!)! < ((((6ββ2)ββ2)ββ2)ββ2)ββ2 Β  But I don't need to approximate (6!)- it's 720 off the top of my head. Β  β΄ A better upper bound is (((720ββ2)ββ2)ββ2)ββ2.

Now for the lower bound, I could put ((((5!)!)!)!)! but the upper bound above makes me wonder the upper bound of it, (((120ββ2)ββ2)ββ2)ββ2 is smaller than ((((6!)!)!)!)! so that it makes for a better lower bound.

(((120ββ2)ββ2)ββ2)ββ2 Β  = (((120^120)ββ2)ββ2)ββ2
= ((((120^120)^(120^120))^((120^120)^(120^120)))^(((120^120)^(120^120))^((120^120)^(120^120)))) Β  (120^120)^(120^120) Β  = 120^(120 Γ 120^120)
= 120^(120^121) Β  β΄ ((((120^120)^(120^120))^((120^120)^(120^120)))^(((120^120)^(120^120))^((120^120)^(120^120)))) Β  = ((120^121)^(120^121))^((120^121)^(120^121)) Β  (120^121)^(120^121) Β  = (120^(120+1))^(120^121) Β  = 120^(120^122 + 120^121) Β  β΄ ((120^121)^(120^121))^((120^121)^(120^121)) Β  = (120^(120^122 + 120^121))^(120^(120^122 + 120^121)) Β  = 120^(120^244 + 2 Γ 120^243 + 120^242) Β  < 120^(4Γ120^244)
While ((((6!)!)!)!)!
= (((720!)!)!)!
720!
&gt; (((120^600 Γ 2^118 )!)!)!\
&gt; (((120^(120^600 Γ 2^118 - 121) Γ 2^236 ))!)!\
(120^600 Γ 2^118 + 121) > (4Γ120^244)
β΄ (((720!)!)!)! >>>>> (((120ββ2)ββ2)ββ2)ββ2. Β  So my final chain of numbers, some tidier than others, is: Β  ((((5!)!)!)!)! = (((120!)!)!)! < (((120ββ2)ββ2)ββ2)ββ2 < 120^(120^600 Γ 2^118 - 121) Γ 2^236 < ((6!)!)! = (720!)! Β < (((6!)!)!)! < ((((6!)!)!)!)! (the number in question) = (((720!)!)!)! < (((720ββ2)ββ2)ββ2)ββ2 < 720ββ2βββ3

Edits: formatting

π︎ 2
π°︎ r/googology
π¬︎
π€︎ u/siuwa
π︎ Sep 16 2017
π¨︎ report
Deriving this probability bounds

I have been having some issues deriving the probability bounds on page 2 at the bottom of this lecture note: http://pages.cs.wisc.edu/~shuchi/courses/787-F09/scribe-notes/lec7.pdf in equation 7.1.5.

The probability expression using a binomial distribution is easy, but they create a bounds as Pr[ bin has at least k elements] <= (e/k)^k which I am having issues deriving.

I have been trying many different approaches with Stirling's approximation to derive this bounds, the closest I got was to use the ratio form of Stirling's equation that tends to 1 as n goes to infinity.

Additionally, in their explanation of maximum load they simplify 3 * ln(n) * ln(ln(ln(n))) / ln(ln(n)) ~ ln(n) as n->inf. In my derivation this approaches 3/e * ln(n). Did they just approximate 3/e as being 1, or am I missing something here?

If anyone has any insights to share it would be greatly appreciated.

Thank you.

Edit: I don't know how to format LaTeX on Reddit apparently.

π︎ 3
π°︎ r/math
π¬︎
π€︎ u/on1chi
π︎ Oct 29 2015
π¨︎ report
Testing endpoints of interval of convergence for a power series. [Com. College Calculus]

We were given the following the following power series and had to find the radius and interval of convergence.

[; \sum \frac{k^{k}x^{k}}{(k+1)!} ;]


Using the ratio test for absolute convergence finds that x must lie between -e^-1 and e^-1.

I'm about 90% sure about that, but I can show the steps if necessary. The problem I'm having is testing the endpoints, because the ratio test is inconclusive for those values. I've found that using a Stirling approximation for the factorial in the denominator allows for a simple divergence test (test the limit of function that generates the terms of the series as the independent variable approaches infinity) but that formula isn't touched on anywhere in our textbook that I can find, and the concepts needed to prove it are don't seem to be either. With that in mind, as well as the fact that this problem is a relatively early (read:supposedly simple) problem in the section, I think there must be a better approach.

I hope the LaTeX works...if not, I'll do my best to fix it or represent the math another way.
 Guess I did something wrong...
[edit: the sequel] Fixed, I think.

π︎ 3
π°︎ r/learnmath
π¬︎
π€︎ u/Doctor_Ingo
π︎ Apr 30 2013
π¨︎ report
Question about the role of e in derivation of Maxwell-Boltzmann

SO

I'm curious about the role of this magic number e in our physical laws, and as I'm taking a P-Chem class right now I thought I'd look into it now.

So lets work backwards. We see that the Maxwell-Boltzmann distribution law has an e in it. Where did that come from? Well, from the fact that there is a natural logarithm in the Boltzmann entropy formula.

Why are there natural logarithms in the Boltzmann entropy formula? Well, there seems to be no real reason. My first impression was that this was because of the use of Stirling's Approximation (x! ~= (x/e)^x for large x), but when looking at the derivation you see this isn't actually so (tl;dr the e's all cancel from Stirling's approximation):

Say we have a total N objects, n1 of the first kind, n2 of the second, and nt of the tth. (tth. yes. lol).

Number of total possible states of this system (equivalent to combinations with repetition) is W = N!/(n1! * n2! ***... *** nt!).

Using stirling's approximation we have (an e, that goes away!)

W = (N/e)^N / ((n1/e)^n1) *** ... *** ((nt/e)^nt)

Now, noting that N = n1 + ... + nt, we see that the e's all cancel. That is, the (1/e)^N in the numerator is canceled by (1/e)^(n1+...+nt) = (1/e)^(N) in the denominator.

So we arrive at:

W = N^N / (n1^n1)***...*** (nt^nt).

Using the basic fact that in a discrete probability distribution n_i = N*p_i,

W = N^N / ((Np1)^n1) *** ... *** ((Npt)^nt)

--> cancelling terms,

W = 1/(p1^n1) *** ... *** (pt^nt)

**[Important part]*And now the typical derivation is just "herp derp, take the natural logarithm of both sides and arrive at S = kln(W) = k sum from i = 1 to t of -p_i*ln(p_i).

But why natural logarithm?! It works just as fine with any other logarithm.

What am I missing?

π︎ 3
π°︎ r/Physics
π¬︎
π€︎ u/TissueReligion
π︎ Oct 15 2013
π¨︎ report
Need help with incomplete gamma function and regularized incomplete beta function.

Hi r/statistics,

I'm working on writing a statistics library for PHP, since the language seems to be so very lacking on it. And yes, I've looked at the PECL library, but the thing has been sitting without much progress for years now. So, I'm trying to build this in native PHP code and release it for free (LGPL) download. Trouble is, I'm absolutely stuck trying to implement the incomplete gamma function and the regularized incomplete beta function. I haven't found anything on the former, though I do have Stirling's approximation in for the complete gamma function. I found a scholarly article on implementing the latter, but I simply cannot understand case C in there.

I'm not so much looking for a mathematical understanding of these functions, though that would be cool, as I'm looking for help in implementing a numeric approximation to the functions.

Many thanks!

π︎ 5
π°︎ r/statistics
π¬︎
π€︎ u/evilmaus
π︎ Oct 03 2011
π¨︎ report
Recursive Relation [Algorithm Analysis]

Not sure if this is the right sub-reddit for this question, but I've been stuck on this HW recurrence problem for awhile, and I'm not quite sure how to proceed.

Solve the recurrence. T(N) = T(n^(1/3) ) + logn

Now, I've done k = 1 through k = 3, and substituted a k to get:

T(n) = T(n^(1/3^k ) ) + Sum(1/3^(k-1) ) log n

I don't know how to simplify it from there to something that looks like a Big-O form.

I know I could set k = log(1) and get T(n) for the first part, but I'm not sure what to do with the second part.

Because with logs, the exponents can be coefficients, I've looked at logn^sum(1/3^(k-1) ) and I've seen some resources online talking about n! and Stirling's Approximation, but I don't think that really fits here.

I think I may just not understand some principal about simplifying expressions or something, but I'm not sure. Any help/guidance would be appreciated.

edit: Could it be that since k will always be an integer, that the sum(1/3^(k-1) ) is just an integer, which ultimately doesn't matter? And thus it is O(log n)?

edit: I'm actually more confused on how to get this into closed form now.

π︎ 2
π°︎ r/learnprogramming
π¬︎
π€︎ u/focusandachieve
π︎ Mar 24 2015
π¨︎ report
Probability question with lagrange multipliers

A system is composed of a large number, N, of elementary subsystems (one might picture the subsystems as atoms in a crystal lattice). Each subsystem can exist in one of three quantum states, with energies 0,1,2 eV. Determine the number of microstates of the total system such that N(sub1) subsystems have 0 eV, N2 has 1 eV, N3 has 2 eV. Assume that each microstate has equal probability, determine the most probable values of N1 N2 and N3 given that the total energy is E=0.5N eV.

So, the first part is easy. N!/[N1! N2! N3!]

The second part, I believe to maximize the sum of [(1/3)^N * N!/[N1! N2! N3!]] subject to the constraints N1+N2+N3=N and N2+2N3=.5N. So a lagrange multiplier equation with 3 variables and 2 constraints.

Am I on the right track? Oh, and you take the log of the initial function and use stirlings approximation to deal with the factorials.

π︎ 2
π¬︎
π€︎ u/Lanza21
π︎ Feb 05 2012
π¨︎ report
π︎ 80
π°︎ r/SMBCComics
π¬︎
π€︎ u/Eiim
π︎ Jan 22 2021
π¨︎ report
!
π︎ 3k
π°︎ r/tumblr
π¬︎
π€︎ u/Hummerous
π︎ Dec 21 2020
π¨︎ report
Okay so I need some help with probability......

So me and my friend were trying to calculate the chance of two people (out of a group of 100) picking the same number (between 1-1000). I found a formula online involving factorials however my calculator cannot do 1000!.........if anyone could help me with this then it would be much appreciated!

π︎ 2
π°︎ r/maths
π¬︎
π€︎ u/lukeschoeman
π︎ Feb 04 2021
π¨︎ report
What is the most beautiful mathematical equation?
π︎ 13
π¬︎
π€︎ u/FlamingoFan101
π︎ Dec 19 2020
π¨︎ report
SOTD Soaps Report - Nov and Dec 2020

In the light of u/ythin taking a well deserved break, here's my attempt at pulling together some soap stats for November and December 2020. These stats will not be as fully featured, or as accurate as the old SOTD reports. I don't have the patience and energy and devotion that u/ythin did to go through each thread by hand to compile the stats. What I do have is a framework for generating usage stats from the monthly Hardware reports, and some familiarity with fuzzy matching and NLP.

There are a number of challenges with generating these stats automagically. For example, any users not using TTS can just type anything into their SOTD post in any format they like. Here a few entries for 'soaps' I pulled at random from SOTD comments:

> southern witchworks' pomona

> b & m's levianthan

> tallow + steel lemonspice made in stirling soap co. enhanced slow eating dog...

> Storybook/CLux LFdL

A human can easily detect the intent behind these, but it's significantly harder for a computer to put these into the correct buckets.

These challenges plus my own limited time and energy means I have had to include some constraints / limitations on the process:

• I only count soaps that exist in TTS. If it's not in TTS it's not here.
• I only guarantee to count soaps from posts made by TTS (excluding cases where soaps have been hand typed into TTS by the user)
• I make a best effort to count soaps in posts without TTS formatting or where the user has typed out an approximation of the soap name themselves (see above examples)

As a result these stats are definitely not definitive. They are hopefully indicative though. And hopefully you guys are interesting in seeing them. I personally was interested enough to build this to see them. I have checked that the top 10 results are broadly in line with the u/ythin's results for October, although the totals are not an exact match for obvious reasons. So I'm reasonably confident in overall accuracy.

## Top 50 Soaps November 2020

name shaves unique users avg shaves per user Ξ vs Oct 2020 Ξ vs Nov 2019
Barrister And Mann Leviathan 26 17 1.53 β1 β1
Carnavis & Richardson / C
... keep reading on reddit β‘

π︎ 39
π°︎ r/Wetshaving
π¬︎
π€︎ u/relided
π︎ Jan 12 2021
π¨︎ report
TIL CSP-Stirling is known to have the highest efficiency of all solar technologies (around 30%, compared to solar photovoltaic's approximately 15%) en.wikipedia.org/wiki/Solβ¦
π︎ 3
π°︎ r/todayilearned
π¬︎
π€︎ u/proxyfexor
π︎ Dec 03 2015
π¨︎ report
[Review Series - 12/8] Battle of the Barbershops - Murphy and McNeilβs Triskele

BATTLE OF THE BARBERSHOPS 12/8: Murphy and McNeilβs Triskele

In November, Murphy and McNeil released two barbershop soaps in a βBarbershop De Los Muertosβ themed set, with great artwork and different scents (homages to Jubilation XXV by Amouage and Tom Ford for Man according to their website). This release is a bit of a departure from their standard barbershop both in product labeling >!and scent complexity!<. Hereβs why I think thatβs a good thing, even if they are dupes:

&nbsp;

Labeling is one of the things that perplexes me in wetshaving. Criticisms abound, both positive and negative, and reviewers frequently incorporate them into their βratings systems.β Labels and packaging are a useless review metric for me, because ultimately the soap is what matters (as most artisans use high quality packaging now anyway). Overall, though, I donβt care about the labels either unless I find them offensive (like pin-up/naked women on soap), because the soap is the most important thing for me. As metrics for a review, I don't care about labels or packaging, but from a consumer and marketing perspective, labeling matters a great deal.

&nbsp;

Todayβs review of Murphy and McNeil really think about labels and what I think is effective and what is ineffective in labeling. I find their labeling scheme of black and white geometric patterns un-engaging and underwhelming to the point that I am uninterested in seeking out the names of the soaps, which are equally unhelpful in determining the scent. I think the labels for their new limited edition barbershops are a huge improvement in both naming and labeling though.

&nbsp;

I know that with names like βMurphyβ and βMcNeil,β weβre talking about Irish themes and Gaelic language. Both are uninteresting to me, both from a symbology perspectiveβ¦ and linguistically as well. Maybe you have to be Irish (and I do technically have some Irish blood) to get really excited about it? That's really the point of labeling, branding, and theme in a product, after all; to get excited. For me, Murphy and McNeil falls short in this area with their standard line. Their labeling stands out, but in a completely unmemorable and uninspiring way.

&nbsp;

All of that aside, we reach that enduring question: Is the soap good enough to look past an uninformative label and a confusing name? Youβll have to read on

... keep reading on reddit β‘

π︎ 20
π°︎ r/Wetshaving
π¬︎
π€︎ u/velocipedic
π︎ Jan 23 2021
π¨︎ report
Are there any good formulas that can give you the inverse factorial of x? If not are there good approximations for lamberts W function?

Iβve found some online that involve Stirlingβs approximation, but they all have Lambertβs W function, and I would like to know if thereβs an approximation to Lambertβs W function.

π︎ 3
π°︎ r/math
π¬︎
π︎ Jan 29 2021
π¨︎ report