22 Scheme Physics For Cse Module 5 Notes
22 Scheme Physics For Cse Module 5 Notes
DEPARTMENT OF PHYSICS
Module 5 Notes
1 Physics of Animation 5
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Taxonomy of Physics-based Animation Methods . . . . . . . . . . . . . . . . 5
1.3 Important Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Frame rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.3 Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.4 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.5 Strength and Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.6 Proportions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.1 Motion Lines and Paths . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.2 Motion Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 Acceleration Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 Odd Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5.3 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.4 Odd Rule Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.5 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6 Examples of Character Animation . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.1 Jumping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6.3 Walking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.7 Model and Previous Year Questions . . . . . . . . . . . . . . . . . . . . . . . 23
1.8 Numericals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3
CONTENTS
2.7 Numericals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Physics of Animation
Syllabus
Physics of Animation
Taxonomy of physics-based animation methods, Frames, Frames per Second, Size and
Scale, Weight and Strength, Motion and Timing in Animations, Constant Force and
Acceleration, The Odd rule, Odd-rule Scenarios, Motion Graphs, Examples of Character
Animation: Jumping, Parts of Jump, Jump Magnification, Stop Time, Walking: Strides
and Steps, Walk Timing. Numerical Problems.
1.1 Introduction
Animation is a technique that involves capturing consecutive images, whether they’re draw-
ings, models, or puppets, in a sequence to generate the perception of motion. Our eyes retain
an image for about a tenth of a second, and when multiple images are presented quickly one
after another, our brain merges them into a single fluid image. Thus, animation is essen-
tially the art of manipulating these still images at a high speed to fabricate the illusion of
movement.
1. Kinematics: This involves the study of motion without taking into account the aspects
of mass or forces. It’s purely about the movement and the path that an object follows.
2. Dynamics: This is a more comprehensive study of motion, where both mass and forces
are taken into consideration. It’s not just about the movement, but also about the ’why’
behind it - what forces are causing the object to move and how does its mass affect this
motion.
Each of these categories can further be broken down into two subgroups:
Inverse: This involves studying motion when we know the starting and ending points,
but not necessarily the path or the forces involved. For instance, consider a robot arm.
We might know where the arm starts (the shoulder joint) and where we want it to end
5
1.3. IMPORTANT TERMINOLOGY
up (holding a cup). But we need to figure out how to get it there - what path should
it take, what forces need to be applied at the joints. This is where inverse kinematics
and dynamics come in, helping us compute the motion ”backwards”.
Forward: This is the study of motion when we only know the starting point and the
forces acting on the object. The goal here is to predict where these forces will move
the object. Going back to our robot arm example, we might know the starting position
of the arm and the forces being applied at the joints. Using forward kinematics and
dynamics, we can predict where the arm will end up.
These concepts form the foundation of physics-based animation and simulation, providing
the tools to create realistic and accurate movements in animated objects. As we delve deeper
into this field, we’ll explore these concepts in more detail and see how they’re applied in
various scenarios.
1.3.3 Size
In animation, size refers to the dimensions of an object or character within the animated
environment. It’s a fundamental property that can greatly influence the perception and
interaction of the character or object. For instance, the size of a character can dictate their
perceived age, strength, or role within a story. Similarly, the size of an object can determine
how it’s used within the scene. A large boulder might serve as an obstacle for a character,
while a small pebble could be easily picked up and thrown. Adjusting the size of characters or
objects is a common technique in animation to create visual interest or to emphasize certain
elements within a scene.
1.3.4 Scale
Scale in animation refers to the relative size of different elements in a scene. It’s about the
relationship between objects and characters and their environment. For instance, a character
might be drawn larger to show importance or smaller to show distance. Scale can also be
used to create visual effects or illusions. For example, forced perspective is a technique that
uses scale to make an object appear further away or closer than it actually is. This can
be used to create depth in a 2D animation or to exaggerate 3D space. Understanding and
manipulating scale is crucial in animation to create believable environments and to guide the
viewer’s focus.
1.3.6 Proportions
In the realm of animation, scaling a character isn’t as simple as uniformly adjusting its
size. This can be understood by considering a cube (see figure 1.1a). If you double the size
of a cube, its height increases by a factor of 2, its surface area (which scales with the square
of its size) increases by a factor of 4, and its volume (which scales with the cube of its size)
increases by a factor of 8. This principle holds true for any three-dimensional character or
object, regardless of its shape.
When you uniformly scale a character, certain aspects of its body will scale as area
(squares), while others will scale as volume (cubes). Body weight, for instance, is proportional
to volume. However, the strength of muscles and bones, which depends more on cross-
sectional area than volume, increases
√ by area. So to double a muscle’s strength, you
√ would
need to increase its width by 2. To triple the strength, multiply the width by 3. Refer
to figure 1.1b.
Since strength increases by squares and weight increases by cubes, the proportion of a
character’s weight that it can lift doesn’t scale proportionally with its size. For example,
consider a human man who is 6 feet tall, weighs 180 pounds, and can lift 90 pounds, or half
his body weight. If you double his body size, his weight increases eight-fold, but he can only
lift four times more weight. Although he gains strength, he loses agility because he weighs
more than eight times his original weight.
If we triple the man’s size, he becomes 18 feet tall, weighs 27 times more, and can lift
9 times more weight than normal. However, he can now lift only about 17% of his body
weight, which is roughly the weight of one of his legs. If you want a man who’s three times
the normal height to be able to lift the same percentage of his body weight as a normal-sized
man, you would need to scale up his bones and muscles to be 27 times stronger. Since bones
and muscles scale in strength√by cross-sectional area, you would need to multiply the normal
muscle and bone widths by 27, or about five times. The result is a character with muscles
five times larger in a body three times the normal size.
1.4 Motion
In animation, motion refers to the change in position of an object or character over time. It’s
a fundamental aspect that brings life to static images. There are several types of motion in
animation:
1. Linear Motion: This is the simplest type of motion, where an object moves in a straight
line from one point to another.
2. Non-linear Motion: This involves motion along a curved path. It’s typically used for
more complex movements, such as a ball bouncing or a bird flying. The most common
types of non-linear motion are circular, parabolic, and wave.
3. Periodic Motion: This type of motion repeats in a cycle. Examples include a swinging
pendulum or a character walking or running.
4. Random Motion: This involves unpredictable movement, often used to simulate chaotic
scenes like leaves blowing in the wind or a crowd of people.
5. Rigid Body Motion: This involves the movement of solid objects that don’t deform
when they move. Examples include the movement of cars or other mechanical objects.
6. Deformable Body Motion: This involves objects that change shape as they move, such
as a character’s facial expressions or a flag waving in the wind.
Each individual drawing or pose in an animation sequence has what’s known as a line of
action. This line serves as a visual guide to the flow of action within that particular frame
(see figure 1.2). On the other hand, the term path of action is used to describe the trajectory
along which an object or character moves throughout the animation sequence (see figure 1.3).
The path of action primarily illustrates the direction and route of the motion in space.
While it can provide some insight into the timing of the motion, its main purpose is not to
depict timing but rather to outline the course of the movement.
Position-Time Graphs: These show how the position of an object changes over time.
If the graph is a straight line, it indicates an object moving at constant speed. If the
graph curves, it indicates the object is accelerating; more the curve bends, more is the
acceleration. The slope of the graph at any point (accelerating or not) represents the
speed of the object at that moment; higher the slope, higher is the speed of the object.
Speed-Time Graphs: These show how the speed of an object changes over time. If the
graph is a straight line, it indicates an object moving at constant acceleration. The
slope of the graph at any point represents the acceleration of the object at that moment;
higher the slope, higher is the acceleration of the object.
Acceleration-Time Graphs: These show how the acceleration of an object changes over
time.
1.5 Timing
Timing in animation is a crucial aspect that determines when different frames are displayed
during an animation sequence. It controls the speed and rhythm of the motion, and can
greatly influence the perception of a character or object’s speed, weight, and personality.
Let’s delve into timing for different types of motion:
Linear Motion: This refers to motion in a straight line, always in the same direction.
An object moving with linear motion might speed up or slow down as it follows a linear
path. A heavy ball rolling on a table or incline is an example of linear motion. The
ball is rotating, but its center of gravity follows a linear path. See figure 1.5a.
Uniform Motion: This is a type of linear motion with constant speed and no acceleration
or deceleration. The distance the object moves between frames is the same over a period
of time. The longer the distance between frames, the higher the speed. Uniform motion
is the easiest to animate because the distance the object travels between frames is always
the same.
Constant Forces
A constant force is a force that doesn’t vary over time. Examples of constant forces include:
(a) Object falling due to gravity (b) Moving object facing friction
Figure 1.6: Examples of constant forces. Directions of net force (dotted arrow) and motion
(solid arrow) are shown.
When constant net force is applied to an unmoving object, the result is acceleration.
When constant net force is applied to a moving object in the same direction as the
motion, the result is acceleration.
When constant net force is applied in the direction opposite the existing motion, the
result is deceleration.
Note that constant acceleration doesn’t mean constant speed. It’s quite the opposite!
Constant acceleration means the object is changing speed constantly.
of odd numbers. Between consecutive frames, the distance the object moves is a multiple of
an odd number.
For acceleration, the distance between frames increases by multiples of 1, 3, 5, 7, etc. See
figure 1.7.
For deceleration, the multiples start at a higher odd number and decrease, for example
7, 5, 3, 1. See figure 1.8.
The Odd Rule is a multiplying system based on the smallest distance traveled between
two frames in the sequence. For a slow-out, this is the distance between the first two frames;
for a slow-in, it’s the distance between the last two frames. This distance, the base distance,
is used in all Odd Rule calculations.
The Odd Rule in its simplest form, as described above, is just one way to use it. For example,
you can instead calculate the distance from the first frame to the current frame and use these
distances to place your object on specific frames.
If you add up all the consecutive frame multipliers up to a particular frame, you get the
multiple for the entire distance. For example, on frame 4, the consecutive multiples thus far
are 1, 3, and 5. If you add up these numbers you get 9, which is the multiplier for the entire
distance up to frame 4. So if x0 is the base distance,
If you’re calculating the distance for a large number of frames and a chart like this isn’t
practical, you can figure out the odd number multiplier for consecutive frames with this
formula:
In the chart above, note that the distances in the last column are squared numbers:
4 = 22 , 9 = 32 , 16 = 42 , and so on. One of the benefits of the Odd Rule is you can calculate
the total distance traveled from the start point to the current frame with the following
formula:
Multiplier for distance from first frame to current frame = (current frame # − 1)2
When setting your frames, you can use either the consecutive frame multipliers or total
distance multipliers. Choose the one that’s easiest for you to use for your animated sequence.
Q 1. Given the base distance 0.5 cm for slow out, calculate the distance between the frames
(a) #4 and #5, (b) #1 and #7 using odd rule multipliers.
Given:
x0 = 0.5 cm, and slow out animation
(a) odd number multiplier between frames #4 and #5 = 2 × (5 − 1) − 1 = 7
distance between frames #4 and #5 = 7 × x0 = 7 × 0.5 = 3.5 cm
(b) multiplier between frames #1 and #7 = (7 − 1)2 = 36
distance between frames #1 and #7 = 36 × x0 = 36 × 0.5 = 18 cm
(or)
We can draw a table to find out the distances. If the base distance x0 = 0.5 cm, then for
slow out
Distance b/w consecutive frames Distance b/w first frame and this
Frame #
(cm) frame (cm)
1 n/a 0
2 1x0 = 0.5 1x0 = 0.5
3 3x0 = 1.5 4x0 = 2.0
4 5x0 = 2.5 9x0 = 4.5
5 7x0 = 3.5 16x0 = 8.0
6 9x0 = 4.5 25x0 = 12.5
7 11x0 = 5.5 36x0 = 18.0
Given:
x0 = 1 m, and slow in animation
For slow in, the total number of frames is required. Since it is not given explicitly, we
will take the highest frame number as the total number of frames, which in our case is 4.
The formulae we discussed previously are not applicable in the case of slow in. So we will
use a table to find the distances. If the base distance x0 = 1 m, then for slow in
Distance b/w consecutive frames Distance b/w last frame and this
Frame #
(m) frame (m)
4 n/a 0
3 1x0 = 1 1x0 = 1
2 3x0 = 3 4x0 = 4
1 5x0 = 5 9x0 = 9
(a) distance between frames #2 and #3 = 3 m
(b) distance between frames #1 and #4 = 9 m
Using the base distance, you can calculate the distances between each frame.
If you add up the distances traveled, you will find that they add up to exactly 0.4 m.
Suppose you have a moving object that you want to slow down, and you’ve set the first two
frames of the slow-in to give an idea of the pacing for the sequence. Note that you had one
frame already and now you add two more frames after that from where the slow in starts.
The first of these two new frames will be the first frame for the slow in but the second frame
for our calculations.
Suppose the distance between the original frame and the slow-in frame is 0.5 m and the
distance between the slow-in frame to the next frame is 0.35 m as shown in the figure 1.9
(this is also a known, important numerical). We will need to first find out the base distance
for this sequence (the distance between the last two frames since it is a slow-in). But we
don’t yet know how many frames will be part of this sequence. So we need to find out that
as well.
One feature of the Odd Rule is that the base distance is always half the difference between
any two adjacent distances. To find the base distance, you can simply calculate:
0.5 m − 0.35 m
≈ 0.07 m
2
To figure out how many frames are in the slow-in, divide the first distance by the base
distance to find out which odd number it corresponds to (rounding up to next integer, if
necessary).
0.5 m
≈7
0.07 m
This means the first distance corresponds to 7 in the 7, 5, 3, 1 sequence, making the
sequence four frames long (counting from the slow-in frame). Now you can work back the
other way, multiplying your base distance by odd numbers to get the distances for the rest
of the slow-in frames.
Q 1. While animating a speeding up car, the total distance travelled over 6 frames is 25 m.
Calculate the base distance.
Given:
Total frames = 6
Total distance = 25 m
Animation type: slow out
x0 = 1 m
Q 2. A slowing-in object in an animation has a first frame distance 0.5 m and the first slow
in frame 0.35 m. Calculate the base distance and the number of frames in the sequence.
The solution to this question has already been discussed above.
Parts of a jump
A jump can be divided into several distinct parts:
1. Crouch: A squatting pose taken as preparation for jumping. See figure 1.11a.
2. Takeoff: Character pushes up fast and straightens legs with feet still on the ground.
The distance from the character’s center of gravity (CG) in the crouch to the CG when
the character’s feet are just about to leave the ground is called the push height (see
figure 1.11b). The amount of time (or number of frames) needed for the push is called
the push time.
3. In the air: Both the character’s feet are off the ground, and the character’s center of
gravity (CG) moves in a parabolic arc as any free-falling body would. First it reaches
an apex, and then falls back to the ground at the same rate at which it rose. The
height to which the character jumps, called the jump height, is measured from the CG
at takeoff to the CG at the apex of the jump (see figure 1.11c). The amount of time
the character is in the air from takeoff to apex is called the jump time. If the takeoff
pose and the landing pose are similar, then the jump height and jump time are about
the same going up as they are going down.
4. Landing: Character touches the ground and bends knees to return to a crouch. The
distance from the character’s CG when her feet hit to the ground to the point where the
character stops crouching is called the stop height (see figure 1.11d). The stop height
is not always exactly the same as the push height.
The path of action can be straight up in the air or over a horizontal distance. The latter
looks like as in figure 1.12.
Push height
Stop height
Frame rate
From these factors, you can calculate the timing for the jump sequence.
When planning your jump animation, the most likely scenario is that you know the jump
height, expressed in the units you are using for your animation (e.g., inches or cm). Placement
and timing for frames while the character is in the air follow the same rules as any object
thrown into the air against gravity. The formula for calculating the time t the object takes
to cover a distance of h under gravity is given by:
s
2h
t=
g
We need to convert this to the number of frames required for the in-the-air sequence. To
do that, we multiply this with the frame rate for the sequence. Let’s take a frame rate of
30 fps for our example. So we have:
Note: It’s certainly possible for you to decide on the jump time first, and then use that
to figure out the jump height. In any case, before proceeding, you will need to have both
jump height and jump time in hand.
Jump Magnification
When calculating the remainder of the timing for the entire jump action (i.e., take-off and
landing), you can use a factor called jump magnification (JM). The JM can be used to
calculate the push timing and stop timing. The JM is the ratio of the jump height to the
push height.
Jump height
JM =
Push height
Since you already know the jump height and push height, you can calculate the JM. Then
you can use the JM to calculate other aspects of the jump.
For example, let’s say we take jump height = 1.2 m and push height = 0.3 m, then JM
will be
1.2 m
JM = =4
0.3 m
The JM, besides being the ratio of jump-to-push vertical height and time, is also the ratio
of push-to-jump vertical acceleration. Note that this is opposite the other ratios: while a
longer jump time means a shorter push time, a higher jump acceleration means a much, much
higher push acceleration. Knowing about this can help you make more informed decisions
about your push timing. To see how this works, let’s look at the formula for JM and relate
it to acceleration:
Jump height Jump time Push acceleration
JM = = =
Push height Push time Jump acceleration
The magnitude of jump acceleration is always equal to gravitational acceleration (or also
called acceleration due to gravity, g), with deceleration as the character rises and acceleration
as it falls.
Push Time
The JM also gives you the ratio of the jump time to the push time:
Jump time
JM =
Push time
So for our example, we can calculate the the push time by using
Jump time
Push time =
JM
0.5 s
=
4
= 0.125 s
During the push, the character accelerates upward from a zero velocity (in the crouch)
to a velocity sufficient to throw herself into the air. This means that we will need to use the
odd rule (constant acceleration) to decide the spacing for the frames.
Stop time
The stop height is often a bit larger than the push height, but the timing of the push and
stop are the same in the sense that the CG moves the same distance per frame in the push
and stop. If the stop height is larger than the push height, you’ll just need more frames for
the stop than the push. This means that
For example, say, the stop height is 0.5 m and the other values are the same as before.
then the stop time will be
0.125 s
Stop time = 0.5 m ×
0.3 m
Stop time = 0.2 s
During the landing, the character decelerates from the point-of-contact position to the
crouch position. This means that we will need to use the odd rule (constant deceleration) to
decide the spacing for the frames.
Q 1. In a case of animating a jump the Push Height is 0.5 m and the JM is 5. Calulculate
the Jump Height and Push Acceleration. Given Gravitational Acceleration 10 ms−2
Given:
To find:
Jump height = ?
Push acceleration = ?
Q 2. The jump animation is associated with a Push Time of 5 frames, Push Height 0.4 m
and Stop Height 0.5 m. Calculate the Stop time. Express the push time and stop time in
seconds if the animation is played at 30 fps.
Given:
Push time (in frames) = 5
Push height = 0.4 m
Stop height = 0.5 m
Frame rate = 30 fps
To find:
Stop time (in frames) = ?
Push time (in seconds) = ?
Stop time (in seconds) = ?
We know that
Push time (in frames)
Stop time (in frames) = Stop height ×
Push height
5
= 0.5 ×
0.4
Stop time (in frames) ≈ 6 frames
Then,
Stop time (in frames)
Stop time (in seconds) =
Frame rate
6
=
30
Stop time (in seconds) = 0.2 s
Finally,
Push time (in frames)
Push time (in seconds) =
Frame rate
5
=
30
Push time (in seconds) = 0.16 s
1.6.3 Walking
Walks feature all the basics of mechanics while including personality. The ability to animate
walk cycles is one of the most important skills a character animator needs to master.
Poses
Walking consists of a series of poses. The four basic poses for a single step are passing, step,
contact, and lift. In the passing pose, the free foot is passing by the opposite leg, and the
body is at its most upright. In the contact pose, the free foot has come forward just enough
to make contact with the ground. See figure 1.13. Passing and contact are the two that are
the most important to get right, as these poses include the most dynamic shifts for center of
gravity, limbs, and secondary motion.
Gait
Gait is the timing of the motion for each foot, including how long each foot is on the ground
or in the air. During a walk, the number of feet the character has on the ground changes
from one foot (single support) to two feet (double support) and then back to one foot. You
can plot the time each foot is on the ground to see the single and double support times over
time as shown in figure 1.15.
In a normal walk, each foot is on the ground about 60% of the time. Both feet are on
the ground about 20% of the time. In the contact pose, both feet are in contact with the
ground. A normal walking gait ranges from 1/3 to 2/3 of a second per step, with 1/2 second
being average.
Walk Timing
Walking is sometimes called controlled falling. Right after you move past the passing position,
your body’s center of gravity is no longer over your base of support, and you begin to tip.
Your passing leg moves forward to stop the fall, creating your next step. Then the cycle
begins again.
The horizontal timing for between the four walk poses is not uniform. The center of
gravity (CG) slows in (decelerates) going from the contact to passing position, then slows
out (accelerates) from passing to contact. The CG also rises and falls, rising to the highest
position during passing and the lowest during contact. The head is in the highest position
during passing.
To walk faster, you naturally increase both stride length and rate, and decrease the time
of double support. A fast walk has a stride rate of about 4 feet/sec. At 6 to 7 feet per second,
the movement transitions into a run.
Note: A slow walk played fast doesn’t look natural because it has a different rhythm than
a fast walk.
Q 1. Elucidate the importance of size and scale and weight and strength in animations.
Q 2. Discuss timing in Linear motion, Uniform motion, Slow in and Slow out.
Q 3. Discuss slow in and slow out with neat diagrams.
Q 4. Sketch and explain the motion graphs for linear, easy ease, easy ease in, and easy ease
out cases of animation.
Q 5. Illustrate the odd rule and odd rule multiplier with suitable example.
Q 6. Describe Jumping and parts of jumping in animation.
1.8 Numericals
The worked examples are the only standard numericals from this chapter.
Syllabus
Statistical Physics for Computing
Descriptive statistics and inferential statistics, Poisson distribution and modeling the
probability of proton decay, Normal Distributions (Bell Curves), Monte Carlo Method:
Determination of Value of π. Numerical Problems.
2.1 Introduction
Statistical Physics for Computing is an interdisciplinary field that applies the principles of
statistical physics to computing. Statistical physics, which uses statistical methods to explain
the behavior of a large number of particles in a system, can be used to solve complex problems
in computing. This includes areas such as optimization, machine learning, and data analysis.
The approach is particularly useful for dealing with systems that involve a large number of
interacting components, randomness, or uncertainty.
25
2.2. TYPES OF STATISTICS
Median (middle value): The middle value when all data points are arranged in order.
For example, the median of 2, 3, and 4 is 3.
Mode (most frequent value): The value that appears most frequently in a data set. For
example, the mode of 2, 3, 3, and 4 is 3. Note that the mode is most often used for
non-numerical data.
Range: The difference between the highest and lowest values. For example, the range
of 2, 3, and 4 is 4-2 = 2.
Variance: The average of the squared differences from the mean. For example, the
variance of 2, 3, and 4 is ((2 − 3)2 + (3 − 3)2 + (4 − 3)2 )/3 = 2/3.
Standard Deviation: Thepsquare root of the variance. For example, the standard
deviation of 2, 3, and 4 is 2/3 ≈ 0.816.
Interquartile Range (IQR): The difference between the upper quartile (75th percentile)
and the lower quartile (25th percentile).
Graphical Representations
Data can be visually represented using various methods like bar graphs, histograms, pie
charts, box plots, and scatter plots. These visuals provide a clear, intuitive way to understand
the data.
Measures of Association
These measures provide insight into the relationships between variables in the dataset, such
as correlation and covariance.
Hypothesis Testing
This is a method for testing a claim or hypothesis about a parameter in a population, using
data measured in a sample. For example, you might want to test the claim that the mean
age of all people in your city is 35 years.
Confidence Intervals
These are a range of values, derived from a data set, which is likely to contain the value
of an unknown population parameter. For example, a confidence interval might be used to
estimate the likely voter support for a political candidate in an upcoming election.
Regression Analysis
This is a statistical process for estimating the relationships among variables. For example,
it can be used to understand the relationship between advertising expenditure and sales
revenue.
e−m mk
P (X = k) =
k!
where X is a Poisson random variable which can take values of k = 0, 1, 2, . . . and m is a
known average rate of the event happening over some time interval. Note that the mean and
the variance of a Poisson distribution are both equal to m.
e−12 × 1215
P (X = 15) = = 0.0723
15!
This means the probability of exactly 15 calls occurring in a given hour at this call center
is 7.23%.
Q 1. The number of particles emitted per second by a random radioactive source has a
poisson distribution with λ = 4. Calculate the probabilities P (X = 0), P (X = 1), P (X = 2).
Given:
λ=4
To find:
P (X = 0) =?
P (X = 1) =?
P (X = 2) =?
We know that
e−λ λk
P (X = k) =
k!
For k = 0, we have
e−4 40
P (X = 0) = = 0.018
0!
For k = 1, we have
e−4 41
P (X = 1) = = 0.073
1!
For k = 2, we have
e−4 42
P (X = 2) = = 0.146
2!
Q 2. On a particular place, volcanic erruption occurs once every 100 years on average.
Calculate the probability of k = 0, 1, and 2 volcanic erruption in a 100 year interval, assuming
the Poisson model is appropriate.
Given:
m = 1 (‘once’ every 100 years)
To find:
P (X = 0) =?
P (X = 1) =?
P (X = 2) =?
We know that
e−m mk
P (X = k) =
k!
For k = 0, we have
e−1 10
P (X = 0) = = 0.367
0!
For k = 1, we have
e−1 11
P (X = 1) = = 0.367
1!
For k = 2, we have
e−1 12
P (X = 2) = = 0.183
2!
N = N0 e−λt
where N0 is the initial number of protons, λ = 1/τ = 10−33 year−1 , called the decay constant,
is the probability that any given proton will decay in a year.
In the case of a proton, since the decay constant λ is extremely small, the exponential
e−λt can be replaced by the first two terms of its Taylor series expansion:
e−λt ≈ 1 − λt
N = N0 (1 − λt) ≈ N0 − N0 λt
To get the number of protons that have decayed after some time, we can rearrange the
above to get
N0 − N = N0 λt
For a small sample, the observation of a proton decay is infinitesmal. But suppose we
consider the volume of protons present in the Super Kameokande neutrino detector in Japan.
The number of protons in the detector volume is reported to be N0 = 7.5 × 1033 protons. For
t = 1 year of observation, the number of expected proton decays is then
About 40% of the area around the detector tank is covered by photodetector tubes, and
if we take that to be the nominal efficiency of detection, we expect about 7.5 × 0.4 = 3
observations of proton decay events per year based on a 1033 year lifetime.
But so far, experimentally, no convincing proton decay events have been observed. Pois-
son distribution provides a convenient means for assessing the implications of the absence of
these observations. If we presume that m = 3 observed decays per year is the mean (which
we have calculated above), then the Poisson distribution function tells us that the probability
for zero observations of a decay (k = 0) is
e−3 × 30
P (X = 0) = = 0.05
0!
The Poisson distribution is suggesting that there is only a 5% probability of no decay
happening in a year, which means there would be a 95% probability of some decay happening.
But experimentally, we have seen no decays yet. So this suggests that the proposed
lifetime of 1033 years is too short.
While this is not a realistic assessment of the probability of observations because there
are a number of possible pathways for decay, it serves to illustrate in principle how even a
non-observation can be used to refine a proposed lifetime.
The normal distribution is characterized by two parameters: the mean (µ) and the stan-
dard deviation (σ). The mean indicates where the bell curve is centered, and the standard
deviation determines the width of the bell curve.
Here’s the probability density function of a normal distribution:
1 (x−µ)2
P (X = x) = √ e− 2σ2
2πσ 2
where x is an outcome from the random variable X, µ is the mean of the distribution, σ is
the standard deviation of the distribution.
1. Create a square and a circle: Draw a square with side length 1, and inscribe a circle
within it with radius 1/2 as shown in figure 2.2. The exact value of π is defined as the
ratio of the circumference of the circle to its diameter, but we’re going to use the ratio
of the areas of the circle and the square.
2. Random Points: Generate a large number of random points of the form (x, y) within
the square using a random number generator. The coordinates of these points will be
between 0 and 1 for both the x and y axes.
3. Count the points: Determine the number of points that fall within the circle.
4. Estimate π: The ratio of the points inside the circle to the total number of points
generated will approximately equal the ratio of the areas of the circle and the square,
i.e.,
Points in circle Area of circle
≈
Total points Area of square
But,
Area of circle π(1/2)2 π
= =
Area of square 12 4
So,
Points in circle π
=
Total points 4
Points in circle
=⇒ π = 4 ×
Total points
Remember, the Monte Carlo method provides an approximation, not an exact result.
The accuracy improves as the number of simulations or random samples increases. Figure
2.3 demonstrates this, where the values have been simulated using Python code.
2.7 Numericals
The worked examples are the only standard numericals from this chapter.