Sunday, December 9, 2012

Free Will and Determinism

       In this post I'll write about the concepts of Free Will and Determinism and show you how Neuroscience regard them in the case of humans. First of all, I'll tell you how I got interest in this topic.
      I was very lucky to have a very tolerant family, who taught me not to disdain the uneducated, the beggars or the poor thieves, since they are just unlucky persons, struggling to survive somehow. However, this belief has evolved somehow in my head and without being aware, the idea of determinism took shape in my thoughts, but in a latent form. This thought was triggered in my conscious during a geography class, when some students from a low rated high school passed next to our window, listening to loud music, singing and swearing. The teacher and my colleagues were extremely intrigued by their impudent behavior and classified them as "animals". That second, watching all the group discussing, a thought stroke me: what if we were born in the same medium with a substantial lack of education and culture? would we be any better? After just a week, a friend told me about chaos theory, about the butterfly effect, which states that a system evolves according to its initial conditions and we are conforming to a statistical process. Then I realized that human beings must also be caught in this chaos, and all their actions are results of their interactions with their peers. So, a person is like a particle in a gas. Its momentum and its direction is due to its mass/charge/etc (that's the equivalent of the inherited genetic material) and the infinite knocks with the other particles.
      This is how I caught interest on this subject. I became so enthusiastic of this new way of perceiving life( actually, enthusiastic is not the good word, since that theory was nothing more than a painful truth), that I made an essay for the common application based on it, task that made me ponder more on this concept.
        What is written with red is the series of events that, like a domino effect shaped this idea in my mind, a series of events upon which, as you can see, I had no control, so the fact that I became interested was just...luck.
       When I was assigned to make an essay for the English course about the ideals of persons, I presented my ideas( I found that this theory was actually pretty old, so I can't say it was my idea) to the class. What I did actually was to emphasize that one doesn't have any control upon his life, so that everyone is caught in a statistical game and that all his decisions are an output of the brain, who had processed the passed experiences. I was expecting the class to dislike my theory, since I was basically telling them that free will is a mith , but I was very  disappointed when they, with the teacher ahead.... laughed. Honestly,their mocking reaction made me think I was stupid and that I made a fundamental logical mistake. I could't refute all their arguments like" if I want to run, I run, if I want to move my hand, I move it, I do what I want". For a month I simply dropped this subject out of my mind( as a chain reaction to their reaction!) Anyway, when searching for a math book in the library, I saw the words" Free Will" on the front cover of the " Scientific American" magazine. You can predict easily that I grabbed it instantly. The article stated that free will doesn't exist and ironically, I felt genuine joy reading this( you know the " I told you so" satisfaction). But the things were actually a lot" worse" than I had expected...
        In      1980s, the Neuroscientist  Benjamin Libet( picture) made an experiment in which several subjects were asked to move their    wrists at random moments, while he monitored the brain and muscles activity. What was surprising is that the brain activity that caused the movements started more than a half of second before the subjects consciously decided to move their wrist! That means that the urge to move was kindled in the subconscious regions of our brain, upon which we can't exert any control and not in our consciousness.  It means that we are not the initiators of our actions. Our brain is like a computer receiving inputs in the form of exterior stimuli and initiates responses that we are simply aware of, but not in control of! You can now infer the connection between this process and the theory of determinism. 


in this image, the W moment is the moment when the subjects think they intended to move, M moment is the moment when subjects think the movement started and moving onset is the moment when the movement ACTUALLY started. The delay between M moment and movement onset is mysterious. Why do people feel moving before they move? This fact seems to support the idea that movement is not controlled by humans, and that they are merely observers of their acting. The most interesting line is the readiness potential( which measures the tension in the muscles) that begins to rise before the subjects decide consciously to move.


          " Related experiments showed that neurostimulation could affect which hands people move, even though the experience of free will was intact. Ammon and Gandevia found that it was possible to influence which hand people move by stimulating frontal regions that are involved in movement planning usingtranscranial magnetic stimulation in the left or right hemisphere of the brain.
Right-handed people would normally choose to move their right hand 60% of the time, but when the right hemisphere was stimulated they would instead choose their left hand 80% of the time (recall that the right hemisphere of the brain is responsible for the left side of the body, and the left hemisphere for the right). Despite the external influence on their decision-making, the subjects continued to report that they believed their choice of hand had been made freely. In a follow-up experiment, Alvaro Pascual-Leone and colleagues found similar results, but also noted that the transcranial magnetic stimulation must occur within 200 milliseconds, consistent with the time-course derived from the Libet experiment" Wikipedia

        There is a neuronal disease that brings evidence for the determinism theory: the alien hand syndrome. Persons suffering of the alien hand syndrome have no control upon the movement of one of their arms. It is observed that they suffered a unilateral trauma in the region of the brain that causes awareness of movement. What is interesting is that, except for the moving awareness in the case of one arm, both arms are still controlled through the same mechanisms! However, the hand which movement is not consciously perceived, seems to move freely. This is way scientists believe that the conscious awareness creates the illusion of free will, which is a consequence of the introspection illusion.
              I'll insist on the introspection illusion. Because of this phenomenon, people are biased to believe that they are smarter, less conventional, in a greater degree of control than the other people are. This impression is...spurious.  For example, football fans watching the players fill that they are influencing somehow the team performance by being there ( by merely hoping for victory). This shows that every persons believes strongly (because of his consciousness) in his liberty of action and tends to neglect the free will of others.
            This fact seems to be depressing. Our body moves "like having its own mind", but we can't see that unless we are ...sick! We say about animals that they are not like us. They aren't aware of their existence. I always wondered how can they move if they are not conscious that they exist. I mean, how is an animal feeling. Now I have the answer. Not the conscious sets the moving. The consciousness is something separate, something unique in nature. In this view, we are observers of our behavior, we have the gift of perceiving our life.  "I thinktherefore I am" Rene Decartes
         Mark Hallett, a researcher with the National Institute of Neurological Disorders and Stroke, said, “Free will does exist, but it’s a perception, not a power or a driving force. People experience free will. They have the sense they are free.“The more you scrutinize it, the more you realize you don’t have it,” he said.


                 That is hardly a new thought. The German philosopher Arthur Schopenhauer said, as Einstein paraphrased it, that “a human can very well do what he wants, but cannot will what he wants.”Einstein, among others, found that a comforting idea. “This knowledge of the non-freedom of the will protects me from losing my good humor and taking much too seriously myself and my fellow humans as acting and judging individuals,” he said.

             Albert Einstein also believed in determinism and was not satisfied of Heisenberg incertitude principle.  According to the Heisenberg Principle, the moment at which a measurement takes place is the moment at which the randomness lying at the heart of quantum reality expresses itself.[3]  Up to that point, everything is fine.  Amplitudes change in a completely predictable, and more importantly, calculable way.  The observer changes the state of what is being observed.  Outcomes can be predicted according to governing probabilities, but the actual outcome cannot be known in advance.This was something Einstein could not live with.  Einstein, as a determinist, felt that the world is a structured and rigid web where effects follows cause and all things should be predictable, given the right information. "God does not play dies" He said
                       If we accept the that we don't have free will, some imminent questions are to be raised. Why should we punish people who did something bad? Why shouldn't I stay and do nothing if I can't control my life anyway?
This questions are answered by Sam Harris, the author of " The Illusion of Free Will" He says that the decision to do nothing is still an uncontrolled reaction to the past occurrences( like discovering that you do not have free will).Also he says that punishment is still necessary,since"it led people to behave better than they otherwise would. 
        However, there might still be hope for the free will. During his experiment, Libet observed that a conscious process occur before the movement takes place. It is believed that the awareness of intention correlates with the choice of which movement will be made, rather than simply that a movement of some kind will be made. This suggests that the conscious experience of control may be linked to the brain process that selects how we will use a particular movement to achieve a general goal. For example, the experience that precedes turning on the light might be linked to the decision about which hand to use to reach for the switch. Although the results of Libet cast doubt on whether conscious processes cause actions, these data remain consistent with the idea that conscious processes could still exert some effect over actions by modifying the brain processes already under way. The fact that conscious awareness of intention precedes movement by a couple of hundred milliseconds means that a person could still inhibit certain actions from being made. Libet apparently replaced free will with free won't.


                    The dorsal fronto-median cortex (dFMC), located in the center of the brain behind the forehead, becomes active when we inhibit an action, according to the authors of a paper in the Journal of Neuroscience. Researchers Marcel Brass and Patrick Haggard think this may explain why some people are less adept at restraining their impulses.
“The capacity to withhold an action that we have prepared but reconsidered is an important distinction between intelligent and impulsive behavior,” said Brass, of the Max Planck Institute for Human Cognitive and Brain Sciences and of Ghent University. This could have significant neuroethical implications, the authors state in their paper, since the inability to restrain impulses has been linked to antisocial and criminal behavior.
                         The frontal lobes have long been recognized as the seat of judgment, foresight, planning and other distinctly human abilities. Damage to this area of the brain can produce a striking loss of impulse control, resulting in inappropriate, belligerent or even aggressive behavior. For example, one man with a tumor impinging on his frontal lobes suddenly began visiting prostitutes and making inappropriate sexual advances toward his stepdaughter. When the tumor was removed his behavior immediately returned to normal.
                        Brass and Haggard, of University College London, detected the impulse control area of the frontal lobes by using functional magnetic resonance imaging (fMRI). They studied the images of 15 right-handed people who were told to press a button on a keyboard at times they chose, and to occasionally hold back or veto their decision to press the button. The decision to refrain from pressing the button consistently produced activity in the dFMC—activity that never appeared when they followed through on their decision to press the button.( taken from Dana foundation Website)
                    So, what's the conclusion after all? I think the determinism theory has some good points, but there is a big flaw in it: the conscious process that can alter the the normal outputs that would come. In quantum theory is also stated that the observer interfere with the experiment. After all, by our conscious process, that's what we are, observers. Humans have the power to imagine and veto the impulses. Even if we don't really initiate our actions, at least we have a freedom to do them if we want to.

References:
http://en.wikipedia.org/wiki/Neuroscience_of_free_will
http://www.jneurosci.org/content/27/51/13919.full.pdf+html?sid=875c253b-71bc-42be-912a-487f3e1f3edf
http://www.jneurosci.org/content/27/34/9141.full.pdf+html?sid=875c253b-71bc-42be-912a-487f3e1f3edf
http://www.scientificamerican.com/article.cfm?id=is-free-will-an-illusion
http://www.nytimes.com/2011/03/22/science/22tier.html?pagewanted=all&_r=0


         

                 



Wednesday, November 28, 2012

EYP

              This post is not about science either. Is about a great activity for teens all around Europe. It is called The European Youth Parliament. About a week ago,I participated at the National Selection Session Romania 2012, where my country chooses its representatives for the International Session. This project is founded by the European Union and its purpose is to encourage teenagers to be active and involve on the social plan.
              During EYP sessions, various committees are formed, using the model of the EU and each is assigned to create a resolution on a specific theme. For example, I was in the Transport and Tourism Committee and our theme was urban mobility. After three days of exhausting committee work, our team managed to create a resolution I am quite proud of(it could be better, but  the time was really short). This is how it looked like:






Here are some photos taken during the committee work and team-building( when we do games to know each other better)








During and after the General Assembly( when we debate the resolutions):







 About a month ago, I discovered an amazing Youtube science channel, called Vsauce. A friend recommended me a video....and my GOD!!! ....it was so f...ing awesome!!! I immediately started to watch the Vsauce videos  like a maniac. I'll stop talking and let you enjoy their fantastic work. Thank you Vsauce !
          These are among my favourites:














Tuesday, November 20, 2012

Me at TV

        Realitatea TV, an important TV channel from Romania started a campaign called" Cine, cum si cand SCHIMBA ROMANIA?""( in translation it means" When, how and who CHANGES ROMANIA?"). During the campaign, important businessmen, scientists, writers and poets from Romania or even from other states are invited to tell their opinions regarding the future of our country, that has many economical and social issues.
        I am also very pleased to see that the Romanian media takes a break from exposing the boobs of a so called" celebrity" or spreading trivial rumors about public figures and finally starts to promote the real values of our country, people who made and can make significant good changes. This kind of campaigns offer Romanians the necessary models  they need to follow in their struggle to overcome the the mentality flaws caused by communism( although Romania is not a communist country since 1989, the harm of the regime on people's mentality can still be felt)
           I am very proud to say that I am among the interviewed people, as the representant of the young generation of Romania. I always had concerns regarding social development and a genuine interest in political science, so that was a great chance to share my view and why not, to inspire students to involve in the public life, by showing them that a teenager's opinions do matter among a lot more experienced persons.
         This video is with me. Unfortunately, I speak in Romanian and I can't put in subtitles,but you can still enjoy it!


     

That's me!




Here are some other videos from the campaign:

Maia Morgenstein, Romanian actress( Maia Morgenstein played the role of Mary in "Passion of the Christ" movie, directed by Mel Gibson):




Francois Rantrua, the president of the World Bank:







Laurentiu Damian, Roumanian theatre director:



Steven van Groningen, the president of the Romania Comertial Bank


Ilinca Dumitrescu, Romanian Pianist:


Radu Gologan, Mathematics Teacher, Coordinator of The Romanian Mathematics Olympic Team

   

Sunday, November 11, 2012

Charge images

      While working a problem given at IPHO 2010, which can be found at this link:http://ipho.phy.ntnu.edu.tw/problems-and-solutions/2010/IPhO_2010_Theo_Problem%201.pdf
I gained a great interest in the charge image method.


The problem asks what's the attraction force between the charge q and the sphere connected to a 0 potential. Following the relatively laborious solution, I started wondering what happened if the sphere was connected to a V potential, or at no potential at all. This is exactly what I will study in this post.

First, let's see what happens if we have two charges, q and -q at a distance d from each other, in an infinite empty space. The equipotential lines and field lines look like this :








You can observe that the equipotential ares have the shapes of " elongated spheres" with one exception (right in the middle is an infinite plane of 0 potential)
The trick is that by replacing charge q with a conductor charged with q as well that has the exact shape of any of the equipotential areas, the exterior field and potential distribution is maintained. O...the conductor must be either initially charged with q, or connected to a potential equal to the potential of the equipotential surface it replaced. q is thus called the "image charge" of the conductor.
For example I'll give you the example when I replace the infinite plane with a conductor. As I said, there are two options: either to charge the conductor with q from the beginning, either to connect it to a zero potential( which is the potential of the area it replaces). In either case, the final result is the same: the conductor is charged with q, has 0 potential and the exterior distribution of field is the same. The attraction force between the plane (or any other conductor) is equal to the attraction force between the initial charges,since the field distribution is kept constant.





So, in order to solve the case with the sphere and the charge q, we must find the charge q', that, in the presence of q, creates an equipotential sphere of 0 potential and radius R.






If you write the equations for the potential in P and solve the equations in the ZOY plane, you will obtain that the equipotential zone of 0 potential is a circle, with the equation  Z^2+ (Y-OO')^2=R^2  (that means that in XYZO space, the zone is a sphere)

You can solve the IPHO problem by finding  the equation of the circle I mentioned previously. Thus you will have the radius and OO' distance. R=-q'd/q; OO'=d q'^2/q; this distribution is possible only if q'/q<0!!!, so pay attention to the signs. In the problem , the radius R and charge q are given, so you can easily find q' and OO'. Since the field distribution is the same outside the sphere( the field is 0 inside), the attraction force between the charge and the sphere is equal to the attraction force between the 2 charges.

Now,what happens if the sphere is connected to Ve? You must find a distribution of charges that gives you desired equipotential  surface,of Ve potential. I said distribution! Nobody said that there must be just one image charge! There can be more. 

If you place another charge right in the middle of the sphere from the previous drawing, you will obtain the equipotential spherical surface of Ve potential I demanded!

the condition that must be respected is simple:

 V_\mathbf{E} = \frac{1}{4 \pi \varepsilon_0} \frac{Q}{r}, \,
 The electrostatic force between the exterior charge and the sphere will equal the sum of the electrostatic forces between the exterior charge and the two image charges!

What if we don't connect it to a potential? Well, since the sphere cannot take charge through the contact anymore, it will remain neutral. Every conductor is an equipotential surface( electrons move freely until they find equilibrium), so the sphere remains an equipotential surface, but the value of its potential is not interesting anymore. There are also two image charges, but the condition that must be respected is Q1+Q2=0! so, Q1=-Q2. 
         I hope you understand now what's up with the image charges after all. If you understand their concept, you can play easily with electrical charges  conductors and field distributions.






Saturday, November 10, 2012

A slippery pencil

Physics is great, because it studies everything, from the expansion of the Universe, to the chaotic movements of molecules. However, before we go that far, I'd like to show you how physics describes the simple falling of a pencil on a table, from a vertical position(θ is 0 at the beginning)
      First, I want you to do the experiment on different surfaces, like in the image above. If you did it right, you should have observed that on smooth surfaces, the head of the pencil touching the surface goes onward or backwards.



It already seems a little complicated. In the next section I will write the equations of motion at a arbitrarily chosen moment during the falling.I strongly urge you to make the calculation by yourself too, because the way I will wrote might not be clear enough.


From the conservation of energy:

Iω^2/2= Mgl ( 1-cosθ) /2
where I is the moment of inertia of the pencil about  the contact point;I=Ml^2/ 3

ω^2=3g(1-cosθ)/l


 the tangential acceleration,  ɛ=dω/dt, is ɛ=3g sinθ /2l



  • the equation of motion on the vertical axis is:


Mg-N = Mω^2*cosθ *l/2  + ɛsinθ *l/2


=> N=Mg((3cosθ-1)/2)^2

  
N becomes 0 at cosθ=1/3=> θlim=70.5; that means that at 70.5 degrees the pencil loses contact with the table(that holds only if the pencil hadn't started to slop till then- the equations of motion would change)
  • the equation of motion of the horizontal axis is:
The F force is sketched having a arbitrarily chosen direction, being equal to the contact force between the surface and the pencil. If the direction chosen is wrong, I will obtain a negative value of the force from the equations, so that will be just fine( I'll change the direction if so).


F= Mɛ *cosθ* l/2 - Mω^2 *sinθ *l/2

=> F= 0.75 sinθ( 3 cosθ - 2)


the condition for the slipping to start is F= μN, so at that moment we can write:

μ=F/N= 3sinθ( 3 cosθ -2 )/ (3cosθ -1)^2

In order to study properly the motion of the pencil, we should sketch a graph between θ and μ, and see when does the pencil starts to slide and how. However a representation with μ=f(θ), will do just fine. 


for arbitrarily chosen values of  θ varying between 0 and 70.5 degrees, I obtained:

θ         μ

0         0

10       0.1301

20       0.2539

30       0.3512

40       0.3411

50       -0.191

60       -5.196

70       -4042

From μ=f(θ) we can figure out that μ becomes negative at cosθ=2/3 , θ=48

at θ=36, μ=0.37, which is the maximum value obtained.

Next, I'll  sketch the graph and I'll explain the falling of the pencil using it.




  • The first part of the graph( black part) is attained when the pencil falls on a smooth surface.  The values of μ are positive, F=μN is positive( N>0 on this interval), so the direction of the force is well drawn. If the direction of F is to the right( as in the drawing), it means that the pencil starts to slip backwards. The conclusion is that the pencil starts to move backwards only if μ=0.37.
  • The second part of the graph( red part) cannot be attained, because the pencil already started to slip, so the solutions are not physical anymore.
  • The third part ( blue part) is attained when the pencil falls on a rough surface. The values of μ are negative,  F=μN is negative( N>0 on this interval), so the direction of the force F must be drawn in the other direction. The conclusion is that when 0.37<μ<1 the pencil starts moving onward.





Well, that's pretty much it...I leave you the pleasure to study the motion of the pencil after it started slipping. Maybe I'll study it in my future posts....







Wednesday, July 18, 2012

Maxwell-Boltzmann distribution formula





Hi, I'm sure that all of you study in school thermodynamics. And you might have heard at least once about Maxwell-Boltzmann distribution, which looks like....this:


f_\mathbf{v} (v_x, v_y, v_z) =
\left(\frac{m}{2 \pi kT} \right)^{3/2}
\exp \left[-
\frac{m(v_x^2 + v_y^2 + v_z^2)}{2kT}
\right],
Have you ever wondered where this huge formula came from? Well, I did. In the post I'll try to explain it as clearly as possible! Enjoy!

First of all I will introduce a few statistical terms, like microstate, macrostate and multiplicity.

A microstate is simply a possible distribution of the elements( particles, energy...) of a system.
A macrostate, on the other hand is a more general characteristic of a system, focusing on the quantity of the elements in the system  distributions.

For example, suppose we drop 3 coins. I'll note one side of a coin with 1 and the other one with 0.

Now, after I drop them, the possible states are:

1 1 1                1 0 0
1 1 0                0 1 0
1 0 1                0 0 1
0 1 1                0 0 0

Each of the 8 occurences is called a microstate!

What about quantities? Well we have:

-3 1 and no 0
-2 1 and 1 0
- 1 1 and 2 0
- no 1 and 3 0

Each of the 4 descriptions of the system is called macrostate!

I think it that this new terms are clear enough now. The multiplicity (Wof a system is the ratio between the number of the microstates and the number of the macrostates. So,in our example the multiplicity is 2. The bigger the multiplicity is , the greater the disorder grade of a system is. For example, if we have one ball and ten baskets, there is one macrostate( the number of the empty baskets stays the same), but the number of microstates is ten( the ball can be placed in 10 different places), so the multiplicity is 10. However, if we have one ball and 20 baskets, the multiplicity is 20! It is  harder to guess where the ball is in the second case, so that system is more chaotic, or more disordered! So, the multiplicity measures the disorder of a system.
*The fundamental assumption of thermodynamics: In an isolated system in thermal  equilibrium, all accessible microstates are equally probable. It is obvious that the macrostates of a system have different multiplicities. In our example, the macrostate "2 one and 1 zero" had a multiplicity equal to 3.

Thus, we can introduce the second law of thermodynamics: A system evolves to the macrostate with the highest multiplicity. It is quite simple to understand why. It is matter of probability. The one with more lottery tickets has the greatest chances to win!  In other words, systems then to flow to the highest degree of chaos. Look at our Universe, which is constantly expanding!

In order to exemplify this better, I will discuss the interaction between two bodies, A and B, that can interact by exchanging energy( they form a closed system). Their total energy is U,so UA + UB = U. The energy of each body can obviously vary from 0 to U. The graph between the multiplicity of the system and the energy of one body, let's say UA looks like this:



 You can observe that the curve is sharper if the energy and the number of oscillators of the system is higher. So, systems with very high numbers of particles( 10^23) will be found almost certainly in a specific state.( the   apex of the curve). Now you should already understand what the thermal equilibrium between two bodies actually mean. The equilibrium temperature established between bodies in contact you learn in school is actually the temperature for which the system is found in the macrostate with the highest grade of disorder. So, temperature is a matter of statistic after all!

Since the equilibrium between the bodies is met at the apex, it is obvious that

dSTOTAL / dUA = 0 at equilibrium.

STOTAL = SA +SB
 so (dSA +dSB)/ dUA =0
the system is isolated, so dUA=dUB
In the end,we get that 
dSA/ dUA = dSB/ dUB= T

thus, I can now introduce the definition of temperature,

T=(dS/ dU)V.N ( at constant volume and number of particles)




The multiplicity of the large systems like gases or other solid or liquid bodies, which are formed of about 10^24 atoms is....a big number. So, scientists introduced a new size, called entropy, noted with S.

           S = k \cdot \ln W \!

where k is the Boltzmann constant.
As multiplicity, entropy measures the disorder grade of a system.`

Of course, a graph between entropy and energy of a body can be sketched as well.

Now, we'll get serious. It's time to demonstrate Boltzmann distribution formula. Boltzmann, not Maxwell-Boltzmann! not yet...

As I stated before,if  a system is isolated, all microstates are equally probable.So if we connect the system to a reservoir with temperature T held constant, microstates with different energies will have different probabilities.
 Let's take to states of the system, s1 and s2, with energies E1 and E2 and probabilities P1 and P2

The probabilities are proportional to the multiplicity of the system, so

P1 / P2 = W1/ W2

or P1/ P2 = e^S1/k /e^S2/k, since     S = k \cdot \ln W \!, S1 and S2 are quantities for the reservoir

dER= TdSR for the reservoir( we write this relation only for this reservoir because its size is so big that its temperature remains constant during the process).

dES=-dER( energy exchanges between the system and the reservoir are complementary), so dES= -TdS so ES= TS( we can integrate like this, since T remains the same)

thus, we obtain:

P1/P2=e^-E1/kT / e^-E2/kT

if the system consist of a large number of particles, the ratio between the number Ni having the energy Ei and the total number of particles N is given by the formula:

{N_i \over N} = {g_i e^{-E_i/(k_BT)} \over Z(T)}

where g_i is the degeneracy (meaning, the number of levels having energy E_i; sometimes, the more general 'states' are used instead of levels, to avoid using degeneracy in the equation) and Z(T) is the partition function.
Considering  

 N=\sum_i N_i,
we get that the partition function equals:
Z(T)=\sum_i g_i e^{-E_i/(k_BT)}.\

The ideal gas is a particular system where Boltzmann distribution applies!

For the ideal gas gi is 0 and  the potential energy between the particles are neglected and the energy is only kinetic.
These are the representations of the Boltzmann distribution for gases at different temperatures!


Next, I'll show you how to derive Maxwell-Boltzmann distribution using Boltzmann distribution.



First, you should understand that the Boltzmann distribution is dealing with energies. You can deduce that according to it, the most probable energy in a system of bodies is 0. However, since the energy in an ideal gas is only kinetic energy, you might infer that the most probable speed is 0, which seems illogical( it's weird to think of perfectly still molecules in the middle of the gas). What's the answer to the riddle? Remember that I said that Boltzmann distribution is only dealing with the probabilities of energies, not probabilities of velocities!

Now, imagine a momentum (or velocity space, since p=mv), which has the axes px, py, pz




Imagine now that all energies in the gas are equally probable. If that were true, the probability of a specific speed is proportional to the area of the velocity sphere , 4πv^2( actually is proportional with the volume of the velocity layer of an infinitely small thickness, 4πv^2 dv),, where
v = \sqrt{v_x^2 + v_y^2 + v_z^2}
That means that 0 velocity has 0 probability and the greatest velocities are the most probable. But that's true only if all energies were equally probable....That's where Boltzmann distribution interfere and offer a model for energy distribution. Now the probability of a specific velocity has the form

,dN/ Ntotal= C 4πv^ *e^-E/kT dv, 

where dN is the fraction of molecules having velocity of v. After integrating the relation, for the all the domain of speeds and number of molecules, we get the constant C. Finally, I am able to write the Maxwell-Boltzmann distribution formula:


,where f(v) is dN/(Ntotal *dv)