Create Bins and View Distributions

tableau, bins, bar, chart, distribution, age, data, science

I have just enrolled in a Data Science course on Udemy  and I learned good stuff.

It’s cool, you finished the 1st part. Now we’re going to do more deep Data Mining analysis with this bank’s dataset.

tableau, bins, bar, chart, distribution, age, data, science

To make these analyzes more deep, we’ll create a more statistical approach.

To do that we will create a new tab.

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

For this new tab, we want to understand how client distributed according to their age. Is there a majority of young or old people ?

tableau, bins, bar, chart, distribution, age, data, science

Move the variable « Age » in « Columns ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

As we want to see the distribution of client ages, we need to use the variable « Number of Records » to see the number of observations. Move the variable « Number of Record » to « Rows ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

Boom, we have a chart but there is only one point on the top right. What happened is that Tableau took the sum of the ages of all the bank’s clients and the sum of all the « Number of Records », it means the total number of clients, 10 000 clients.

We’ll find a solution but before we’ll change the format to better see the chart. Right-click in the middle of the chart and select « Format ».

tableau, bins, bar, chart, distribution, age, data, science

For the font’s size, select « 12 ».

tableau, bins, bar, chart, distribution, age, data, science

Here you can see that the total age is 39 218 but that’s not what we’re looking for. What we want to see is the number of clients for each age.

I’ll explain what’s going on. We took the aggregated sums of our variables. Aggregate means that we took the total sum of the variable for each category. We added the ages but in fact we want to see the total number of observations for each age separately.

To have that, just click on the arrow in « SUM(Age) » in « Columns ».

tableau, bins, bar, chart, distribution, age, data, science

Then select « Dimensions »

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

You see, Tableau doesn’t take the aggregated sum of ages but it takes ages separately. We have a curve that shows us the continuous distribution of our clients ages. That is to say, for each age, the curve gives is the number of clients of this age.

We’ll look at the dataset. Right-click on « Churn Modelling » and select « View Data… ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

There is window that appears that shows us the data in detail. If you scroll to the right, you will find the column « Age ».

tableau, bins, bar, chart, distribution, age, data, science

We see that the ages rounded. As all ages rounded, Tableau is able to group clients by age. By positioning the mouse on the curve, we can see that there are 200 clients who are 26 years old.

tableau, bins, bar, chart, distribution, age, data, science

If in the dataset, ages weren’t rounded, you would have seen clients with 26.5 or 26.3 years. It would create a lot of irregularity, there would be plenty of spikes with lots of variations.

Oooooh look, there is a variation that isn’t normal.

tableau, bins, bar, chart, distribution, age, data, science

Let’s analyze it in detail. Around this peak, we see that there are 348 clients who are 29 years old.

tableau, bins, bar, chart, distribution, age, data, science

Here, 404 clients who are 31 years old.

tableau, bins, bar, chart, distribution, age, data, science

And this peak down that shows us that there are 327 clients who are 30 years old.

tableau, bins, bar, chart, distribution, age, data, science

How to explain this irregularity ? It’s possible that many people of 29 years old are about to turn 30 years old and many people of 31 years old who just had 31 years old. It’s chance that make us have inaccuracies. You may have other inaccuracies if you data isn’t precise and rounded. In our case, the ages are rounded but we want to get rid of our small irregularity that we see on our curve.

There is way to see our distribution without our irregularities, it’s « bins ». « Bins » consists of grouping the information into different categories. That is we’re going to regroup our clients in different age groups.

Right-click on « Age » in « Measures ». Select « Create » and select « Bins… ».

tableau, bins, bar, chart, distribution, age, data, science

A window appears. We’ll group our clients in 5-years increments. In « Size of bins », write « 5 » and click on the « OK » button.

tableau, bins, bar, chart, distribution, age, data, science

As you can see, the variable « Age » has remained in « Measures » but there is a new variable in « Dimensions ».This is the variable we created « Age(bins) ».

tableau, bins, bar, chart, distribution, age, data, science

Our « Age(bins) » variable was correctly placed in « Dimensions » because it is a category variable because each category corresponds to a 5-year age group.

For example, one category is 20 to 24 age group. Now we’ll create a new distribution based on « bins ».

To do that, we’ll remove the variable « Age » from « Columns » with a click and drag outside.

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

You move the variable « Age(bins) » from « Dimensions » to « Columns ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

Note

In this case, it’s not possible to directly replace « Age » by « Age(bins) » over « Age » on « Columns ». This is because « Age » is a measure and « Age(bins) is a dimension.

That’s nice distribution, it’s usually the type of distribution (chart) we see in economics or mathematics. The difference with the old chart is that this chart is discrete. This chart is discrete because the clients grouped by age group while the previous chart was continuous.

On this distribution (chart), each bar corresponds to an age range. For example, this bar corresponds to the 25-29 age group.

tableau, bins, bar, chart, distribution, age, data, science

Now, we’ll change the colors.

In « Row », move « SUM(Number of Record) » while holding down the « Ctrl » or « Command » key on your keyboard to « Colors ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

We get our distribution in blue but we’ll change the color to red. Click on « Colors » and click on « Edit Colors »

tableau, bins, bar, chart, distribution, age, data, science

In the window that appears, click on the blue square on the right to display the color pallet.

tableau, bins, bar, chart, distribution, age, data, science

Select the red color and click on the « OK » button.

tableau, bins, bar, chart, distribution, age, data, science

Click on the « OK » button of the « Edit Colors » window.

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

To facilitate the reading of the bar chart, we’ll add the number of clients in each age group. In « Row », move « SUM (Number of Record) » while holding the « Ctrl » or « Command » key on your keyboard to « Label ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

That’s it, we can see how many clients there are in each age group.

We see that the dominant bar is the 35-39 age bracket and the second dominant bar is the 30-34 age bracket. Overall, we can see that most clients are between 25 and 40 years old, which seems consistent.

On our bar chart, we have absolute values. We’ll replace that with percentages. Click in the little arrow in « SUM(Number of Records) » in « Label » and you select « Add Table Calculation… » but I’ll show you another way to do it.

tableau, bins, bar, chart, distribution, age, data, science

Instead of clicking « Add Table Calculation… », click on « Quick Table Calculation » and select « Percent of total ».

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

It’s cool, we have the exact percentage of people in each age bracket. Now, we can see that in the 25 to 40 age group, we have 20 + 23 +17= 60% of clients.

I’ll show you one last thing.You can change the size of the slices easily, just click on « Age(bins) » and select « Edit ».

tableau, bins, bar, chart, distribution, age, data, science

In the windows, you can change the size of the slices (bins). Put « 10 » instead of « 5 » to get 10-years slices. Click on the « OK » button.

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

Now, we have a distibution with fewer slices and the dominant slice is 30 to 39 years old.

Well, it was just to show you how to change the size of bins. To go back to the old distribution with the 5-years slices, click on « Back » button.

tableau, bins, bar, chart, distribution, age, data, science

tableau, bins, bar, chart, distribution, age, data, science

As you can see, the values on bars are in percentages but the values on the axis are in absolutes values. Here is an exercise that I ask you to do : « Put the values of the axis in percentage ». I’ll give you the answer the next article.

Share this article if you think if can help someone you know.Thank you.

-Steph

Deadlift Correctly (Part 3)

deadlift

If you didn’t read the first parts, click Part 1 and Part 2 

I read a Nerd Fitness article and I learned good stuff.

Grip the barbell

deadlift grip

The strength of the grip is an important part of the deadlift. There are 2 types of grip:

  • Overhand grip => The palms of your hands are towards your body (pronated grip).

  • Over-under ou mixed grip => One palm of your hand is toward your body and the other towards the outside (one hand with a pronated grip and the other with a supinated grip).

  • Hook grip => Your thumb is under your fingers

For beginners, the double overhand grip is the best to have a safe grip.

Use the mixed grip when you have more experience and you lift heavy because there are disadvantages. Stress on the shoulders is uneven and can create problems or injuries in the biceps whose palm is outside. As the stress on the shoulders is uneven, it’s easier to lift heavy weights.

When you begin deadlift, your grip’s strength is powerful enough to lift the barbell because your back’s strength is correct. The day of your back’s strength is more powerful than your grip’s strength (your hands slips slowly), that’s when you need to think about improving your grip.

If you don’t like the mixed grip, you can use the hook grip.

Wrist straps

Straps can help you lift heavier because your grip is assisted by a strap that is wrapped to the barbell and is hooked to your wrist.

I advise you to use wrist straps only when you lift very very heavy. This is not a thing to use all the time otherwise you’ll lose the natural strength of your grip.

Gloves

The truth is that the gloves don’t improve the grip. Gloves create a space between your hands and the barbell, this increases the diameter of the barbell and make the barbell harder to hold. Gloves prevent you from having a secure grip, I advise you to use them only if you have ripped callus to your hands.

With this video , you’ll learn to take care of your hands to avoid having this type of injury.

Belt

Many people in gyms use the belt in the wrong way, but you’re a smart one. The belt is useful only when you’re lifting very heavy weights and it’s not only for your lumbar. With this article , you’ll learn how to use the belt in an effective way.

Note

Use a mixed grip and a belt isn’t necessary to lift very heavy. Watch this video of Anthony Mychan  who do a deadlift at 249.47kg (550lbs) at a Nerd Fitness Camp with a double overhand with no belt.

Common mistakes

common mistakes

Rounded back

Having the back rounded throughout the movement may cause injuries. It’s necessary to have your spine in a neutral position.

Note => there are some powerlifters that purposefully round theirs upper back to decrease the range of motion, but this is a sport specific move, still a fault, and something you should not consider as a beginner.

Head raised and look up

To have a raised head create a hyperextension to your neck. This can cause injuries. Keep your head in a neutral position like your spine.

Hyperextending at the top

In fitness competitions, exaggerate the top of the deadlift has become popular for quickly show the judges that hip and knees locking is done.

Use the squat position

Deadlift is not squat. Deadlift doesn’t have the same start and end position as the squat. Deadlift is a different movement than squat.

Barbell makes a forward movement

It’s necessary that the barbell stays above your shoe’s laces and the barbell needs to be lifted vertically all along your body.

Barbell’s movements towards the front are to be avoided.

Your torso rises after your butt

We call it the « stripper deadlift ».

It’s important that your torso guides the movement and that your body moves in the same rhythm upwards.

Bend your arms

Often people bend their arms to lift the barbell more quickly. Unfortunately, this is a bad tactic because this can tear biceps muscle. Keep your arms straight during the movement.

Share this article if you think it can help someone you know. Thank you.

-Steph

Deadlift Correctly (Part 2)

deadlift

I you didn’t read the Part 1, click here

I read an Nerd Fitness article  and I learned good stuff.

Setup

As you know, there are several versions of deadlift that can match your training goals or your body type but the conventional deadlift is great for starting to learn the basics.

Attention : It’s important to do 1-2 sets warm-up with the barbell without weights. As with squat, this warm-up allows you to prepare joints and muscles.

  • Adds weights and uses collars for safety

    If you’re a beginner, only use 2-26-4.6kg (5-10lbs) plates to make easy to adjust the weights on the barbell. When you have better understood the movement and how your body reacts you can use plates of 20kg (45lbs).

  • Stand with your feet at the width of your hips

    The spacing of your feet is about 20-30cm (8-12 inches) and your toes are slightly outside about 5-10 degrees.

  • Look at the ground

    Place your feet under the barbell so that the barbell almost touches your ankles. The barbell must be on the node of your laces

  • Without moving the barbell or your hips

    Lean forward to take the barbell. Your legs are slightly bent. Your hands should be slightly outside your legs without touching them.

  • Hold the barbell

    Move your hips down so your shins touch the barbell. Stop moving your hips when your shins touch the barbell. Squeeze your torso and keep your back straight to have your back in a neutral position.

  • Your back in a neutral position

    Your back shouldn’t be rounded or hyper extends. If you feel like you don’t have your back in a neutral position, don’t hesitate to ask a friend or a gym’s member to make a video of you with a smartphone while you’re doing deadlift. This will allow you to correct your technique.

    In addition to your spine, uses the upper back’s muscles to help to lift your chest up (swagger).

    Your shoulders should be slightly in front of the barbell and your arms should be straight and perpendicular to the ground.

As each person has unique body, the person next to you will have a different starting position than you and this is normal. Think about it : if a person has long arms, will this person have exactly the same position as a person with short arms ? No.

Deadlift

deadlift movement

  • Ready to lift

    Be focus and squeeze all your body’s muscles

  • Deep breathing

    Take a deep breath and keep your chest up with all your body squeezed ant put all the weight on your heels and on the ball of your feet.

    Imagine driving your feet through the ground.

Here are the important points in this part of the movement :

  1. All the weight must be on your heels and on the ball of your feet. During the movement, you should be able to move your toes.

  2. Your whole body moves slowly at the same speed. Your butt shouldn’t get up faster than your torso.

  3. Be focused on directing your torso and putting the weight on your heels.

  4. Your arms should stay straight during the movement. Your arms only serve to hold the barbell, not pull it.

  5. The barbell stay in contact with all your body. The barbell is a few millimeters from your legs while your lift it. Powerlifters put socks on their shins and chalk or baby powder on their thighs to avoid cuts and scratches The barbell’s trajectory during the movement is a vertical straight line.

  6. Squeeze your glutes. When the barbell goes over your knees, squeeze your glutes to move your hips forward.

  7. When you stand, open your chest as if you’re proud (like a king/queen). Keep your spine in a neutral position (straight back) and all your body tight.

To lower the barbell

As with lifting the barbell, all your body needs to move at the same time.

Your body is always contracted, unlocks your hips and knees and lower the barbell by controlling the movement slowly.

If you unlocks your knees first, you’ll do weird movements that will force you to round your lower back.

deadlift low back rounded

Keep your body contracted until the barbell touches the ground. The majority of deadlift injuries appear during the descends of the barbell. People are so pleased to have lifted a heavy weight that they relax their bodies and lower the barbell with poor technique. It’s important to control movement with your contracted body throughout exercise.

Note

In deadlift the most risky moment is the eccentric part (descending the barbell). This is the part that will give you the most DOMS (delayed onset muscle soreness).

That’s why several personal trainers advise their athletes to throw the barbell on the ground, especially for athletes who must be at 100 % for a competition in a few days.

Share this article if you think it can help someone you know. Thank you.

-Steph

How To Do Barbell Bent Rows

barbell bent rows

I read a Frederic Delavier’s book « Strength Training Anatomy » and I learned good stuff.

Podcast :

Standing with your knees slightly bent. Your have your back straight and incline your torso around at 45°. You take the barbell with a pronated grip and your hands are wider than your shoulder’s width. Your arms relaxed :

  • Inhale, block your breath and squeeze your abs. Pull the barbell to your torso.

  • Returns to the starting position and exhale.

This exercise work latissimus dorsi, teres major, posterior deltoid, arm’s flexor (biceps, brachialis, and brachioradialis).

When your shoulder blades get closer, your rhomboids and trapezius also work.

Incline your torso works your spinal erectors isometrically.

This exercise has several variants like the hand width, pronated or supinated grip or torso inclination allow you to work your back in different angles.

Attention

It’s important to keep your back straight because if you rounded your back during the movement, you risk having injuries.

Share this article if you think it can help someone you know Thank you.

-Steph