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

A Pratical Tip To Validate Your Approach

data science tableau check

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

How was the A/B test « Number Of Product » ? Easy or difficult ?

Here is the result I found.

data science tableau check bar chart

I think you noticed there was something bizarre. There is an anomaly. We imagine that the more the client has products, the more the client is satisfied with the bank so this type of clients should stay in the bank.

In the first 2 bars we can see that a client who has 1 product is more likely to leave the bank than a client who has 2 products. But when a client has 3 or 4 products, we see a huge rate of clients leaving the bank.

Look, there is a little bizarre detail. In the 2nd bar, we can’t see the « Exited » label. This is because there is no place in the orange part to put the text. To make it simpler, we’ll remove the label « Exited ». Drag and drop on the « Exited » text label to the outside.

data science tableau check bar chart

data science tableau check bar chart

Perfect, we can read the percentages. On the 1st bar, we can see that among the client that have 1 products, 28% left the bank. On the 2nd bar, we can see that among clients who have 2 products, 8% left the bank. This show us that clients who have 1 products are more likely to leave the bank than clients with 2 products.

And for the next bars, we observe an anomaly. On the 3rd bar, we can see that among the clients who have 3 products, 83% left the bank. On the 4th bar, we can see that among clients who have 4 products, 100% left the bank. We clearly see that there is a problem and we need to do a deeper analysis to understand what is going on .

As a Data Scientist, we need to explain what happens in bars 3 and 4. Usually when a client has 3 or 4 banking products, that means he/she is satisfied and is loyal to the bank. But in our case, it’s the opposite because there is a high rate of client who left the bank. This is the time to do deeper analysis.

The first thing to analyze is the quality of the data. There is a very big anomaly and it may be because there is something insignificant in our data that disturbs the statistics. For example, it’s possible that when the bank selected these clients in this sample, there were very few clients with 4 products and all those clients with 4 products left the bank. Sometimes chance can create anomalies and you have to play attention to these effects of chance because they don’t seem important but they can create false interpretations.

To start, we will check the number of clients with 4 products.

In « Measure », move « Number Of Records » (which gives the number of observations) on « Label ».

data science tableau check bar chart

data science tableau check bar chart

We observe on the first 2 bars than many clients with 1 or 2 products selected for our sample. For clients with 3 or 4 products, we can see that there were fewer clients selected for our sample.

There are 220 clients with 3 products and 60 clients with 4 products. These small number of clients probably explain why we observe these anomalies.

In this sample of randomly selected clients, there are very few clients with 4 products and they all left the bank. In this situation, we can confirm that it’s a chance. When thing like that happen, you have to be very careful not to make conclusion too fast and make misinterpretations.

The conclusion is that a lot of clients have been selected for category 1 and 2. For category 3 and 4, there have been few clients selected so we can’t do accurate statistics. We need to do deeper analyze for these categories of clients with 3 and 4 products.

Now, let’s put the percentage back on the bar chart. Click on the « Back » button.

.

data science tableau check bar chart

Or do a click and drag of « SUM(Number of Record) » to outside.

data science tableau check bar chart

data science tableau check bar chart

We saw that there is an anomaly and what is interesting to do is to have a comment to remember to do a more in-depth analysis of columns 3 and 4.

Right-click between the bar chart’s title and the bars. Select « Annotate » then « Areas… ».

data science tableau check bar chart

A window appears. In this window, you write « Low observation in last 2 categories » and click on the « OK » button.

data science tableau check bar chart

data science tableau check bar chart

Click on the comment and move it on bars 3 and 4.

data science tableau check bar chart

data science tableau check bar chart

The next time you work on this bar chart, you will see this comment that will remind you to seriously analyze client who have 3 and 4 products.

Validate our approach

It’s time to show you how to validate an approach and how to validate the data. For this we will create a new A/B test.

Duplicate this worksheet with a right-click on the « NumberOfProducts » tab and select « Duplicate ».

data science tableau check bar chart

And rename the tab « Validation ».

data science tableau check bar chart

For this tab, we will erase the comment. Select the comment and press the « Delete » button on your keyboard.

data science tableau check bar chart

data science tableau check bar chart

Everything is ready, the idea is to find a variable that doesn’t affect our results. That is a variable that has no impact on a client’s decision to leave or stay in the bank.

Take for example, the variable « Customer Id ». Client’s identification number has no influence on the client’s decision to stay or leave the bank.

We’ll do an A/B test with the last digit of the « Customer Id » and we’ill check that there is the same clients proportion who leave the bank in the 10 categories of the last digit of the « Customer Id ». The 10 categories are the numbers 0,1,2,3,4,5,6,7,8,9.

Let’s g.To start, we will create the variable that contains the last digit of the « Customer Id ». To have this variable, we will create a « Calculated Field ».

Right-click on « Customer Id », select « Create » and click on « Calculated Field ».

data science tableau check bar chart

data science tableau check bar chart

Name the calculated field « LastDigitOfCustID ». In the text field, we use the « RIGHT » function with « Customer Id » in parenthesis to select the last character of the « Customer Id ». In our case, the last character of the « Customer Id » is the last digit.

Here is the code to write in the text field : Right ({Customer Id},1)

data science tableau check bar chart

data science tableau check bar chart

Oooops, you see there is a small mistake => The calculation contains errors.

There is an error in the formula because « Customer Id » is a number variable and the « RIGHT » function applies to a variable of type « STRING ».

To use the « RIGHT » function, we will convert « Customer Id » into a string. We will use the « STR » function with « Customer Id » in parenthesis.

Here is the code to write in the text field

And click on the « OK » button : Right (STR({Customer Id}),1).

data science tableau check bar chart

Now, you can see that our calculated field « LastDigitOfCustID » is in « Dimensions ».

Click on « LastDigitOfCustID » and move it on top of « NumOfProducts » in « Columns ».

data science tableau check bar chart

data science tableau check bar chart

Now we have a new bar chart and we see that for every last digit of the « Customer Id » there is about the same proportion of clients leaving the bank. All these proportions don’t correspond exactly to the average of 20% but these slight variations aren’t important.

Seeing this uniform distribution allows us to validate our data because these data are homogenous.

Conculsion

Here’s how you can check the homogeneity of your data. You take a variable that has no impact on the fact that a client leaves or stays in the bank. The example we did with the last digit of the « Customer Id » is excellent. We were able to verify that in each of the categories taken by this variable, if there was the same proportion of clients leaving the bank. As is the case, we can validate our data.

Imagine another result. When we do the test with the last digit of the « Customer Id », we observe that for one of the numbers, the rate of clients who left is really higher than the average. This shows us that there is a problem in our data because it indicates an anomaly.

You can find other ways to verify your data by using other « insignificant variables » to see if the distribution is homogeneous. But be careful when you select an « insignificant variable » because there may be traps.

Here is an example. If you create a variable that takes the first letter of the first name, the distribution will not be homogeneous. The reason is simple, there are many more people who have a name that starts with the letter « M » than with the letter « Y ».

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

-Steph

Look For Anomalies

anomaly

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

We’ll learn how to duplicate a bar char to create a new A/B test. We’ll create several A/B test to look for anomalies.

But before that, we’ll name the sheet. Right-click on the tabe and select « Rename Sheet ».

tableau a/b test tableau dataset anomalies

Rename the sheet « Gender ».

tableau a/b test tableau dataset anomalies

Now right-click on the « Gender » tab and select « Duplicate ».

tableau a/b test tableau dataset anomalies

Rename this new tab « Country ».

tableau a/b test tableau dataset anomalies

We’ll do an A/B test with the countries and we’ll reuse everything we did with the A/B test « Gender » to save time.

As you can see « Gender » is in « Columns ».

tableau a/b test tableau dataset anomalies

To use this A/B test with a variable other than « Gender », move the variable you want on top of « Gender » in « Columns ».

Go, go ! There is « Geography » in « Dimensions », takes « Geography » and puts it on « Gender ».

tableau a/b test tableau dataset anomalies

Boom with 1 click we have our A/B test for countries.

tableau a/b test tableau dataset anomalies

We have the percentage of clients who left and stayed in the bank for each country (Germany, Spain and France).

In this A/B test we can see that in Germany, many clients left the bank with a rate of 32%. For Spain and France, the rate of clients who left the bank is below the average departure rate (20%), 17% for Spain and 16% for France.

Already, we have interesting insigns. We can find out if in Germany there is a new aggressive competitor with more interesting offers or if there is a new law unfavorable to the bank’s offers that has been voted. It’s necessary to do reseach in Germany to find the reason for this high rate of departure.

You have seen, usually an A/B test has 2 categories but in our case, there are 3 categories. We could call it an A/B/C test but it’s a bit bizarre. When there are more than 2 categories, we call it a classification test.

In this article, I will continue to use the term A/B test but remember the term classification test for the next time.

Let’s do another A/B test quickly.

Duplicate this A/B test by right-clicking on the « Country » tab and selecting « Duplicate ».

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

This time we will study the variable « Has Cr Card ». This variable is « 1 » if the client has a credit card and « 0 » if the client doesn’t have a credit card.

You saw ? This variable is a categorical variable because it is binary « 1 » and « 0 » but it is in « Measures ». Since this variable is categorical, it should be in « Dimensions » so we will move the variable « Has Cr Card » from « Measure » to « Dimensions ».

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

Now that it’s done, move « Has Cr Card » over « Geography » in « Columns ».

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

It’s cool, we have a new A/B test for credit cards. What we can observe in this A/B test is that there is not a big difference between the departure rate of clients who don’t have a credit card (21%) and the departure rate of clients who have a credit card (20%).

It’s time to create aliases for this A/B test. Right-click on « Has Cr Card » and select « Alias…. ».

tableau a/b test tableau dataset anomalies

To start, « 0 » means that the clients don’t have a credit card so in « Value », you write « No ». « 1 » means that the clients has a credit card so in « Value », you write « Yes ». Then you click on the « OK » button.

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

That’s it, the bar chart is easy to read now. We understand that among clients who don’t have a credit card, 21% left the bank and among clients who have a credit card, 20% left the bank. We can conclude that having or not having a credit card doesn’t have a significant impact on the decision to leave the bank.

It’s time to rename this tab. Right-click on the « Sheet4 » tab and select « Rename Sheet ». Name the sheet « HasCreditCard ».

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

Let’s go, let’s do another A/B test with another variable. Let’s look at « Measure » and study the variable « IsActiveMember ».

The variable « IsActiveMember » is « 1 », if the client is active and « 0 » it the client is inactive. It’s necessary to detail the definition of IS ACTIVE. IS ACTIVE depends on the criteria of the bank. For example, it could be : « Did the client log in at least once to their bank account last month ? » or « Has the client made at least one banking transaction last month ? », etc.

As you can see, the variable « IsActiveMember » is a categorical variable (binary 1 and 0) so it’s a variable to move to « Dimensions ».

Here’s another way to move a variable from « Measures » to « Dimensions ». Right-click on « IsActiveMember » and select « Convert to Dimensions ».

tableau a/b test tableau dataset anomalies

Perfect, the variable « IsActiveMember » is in « Dimensions ».

tableau a/b test tableau dataset anomalies

We will duplicate our « HasCreditCard » sheet. Right-click on « HasCreditCard » tab and select « Duplicate ».

tableau a/b test tableau dataset anomalies

Renamce this tab « IsActiveMember ».

tableau a/b test tableau dataset anomalies

Since we have diplucted what we did with « HasCreditCard », we simply need to take the variable « IsActiveMember » from « Dimensions » and more that over « HasCrCard » in « Columns ».

tableau a/b test tableau dataset anomalies

tableau a/b test tableau dataset anomalies

Let’s create aliases to make reading this bar chart easier. Right-click on « IsActiveMember » and select « Aliases… ».

tableau a/b test tableau dataset anomalies

For « 0 », we put « No » because the client is not active and for « 1 », we put « Yes » because the client is active. Click on the « OK » button.

tableau a/b test tableau dataset anomalies

Here is what we can see with this A/B test « IsActiveMember ». Among inactive clients, 27% left the bank. Among active clients, 14% left the bank. This show is that clients who are not active are more likely to leave the bank than active clients.

Indeed, a client who is active means that he/she uses his/her bank account and products of the bank so an active client is satisfied with the bank. It’s possible that some clients leave the bank because of external factors such as a competitor, new regulations or elements of the private life of the client.

It’s cool, we created 4 A/B tests in a few minutes.

  1. An A/B test « Gender » that allowed us to see that women were more likely to leave the bank.

  2. An A/B test « Country » that allowed us to see that it is in Germany that clients are most likely to leave the bank.

  3. An A/B test « HasCreditCard » which allowed us to see that having or not having a credit card didn’t have a significant impact on the descision to leave the bank.

  4. An A/B test « IsActive Member » allows us to see that client who aren’t active are more likely to leave the bank .

I will leave you a homework. You’ll do an A/B test with the variable « Number Of Product » which is still a category variable. The variable « Number Of Products » indicates the number of product that the client has in the bank. Add aliases to make reading the bar chart easier.

I trust you I’ll give you the answer in th next article,

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

-Steph

Work With An Alias

data science alias bar chart tableau mining

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

In the last article, I showed you how to do a simple A/B test. We will continue with the result we had with the A/B test.

data science alias bar chart tableau mining

Here is the result of the A/B test. What is in orange is the percentage of men who left the bank, it’s 16%. What is in blue is the percentage of women who left the bank, it’s 25%.

With our bar chart we can quickly see that women are more likely to leave the bank than men, all the rest being equal in our sample.

I remind you that this is a basic A/B test. There are 2 type of A/B test, the basic A/B test and the statistical A/B test. The statistical A/B test is done with a statistical test like the KHI-2 test. For our case, the basic A/B test already give us good insights.

To make our bar chart even easier to read, we will work with aliases.

The first thing we will do is we will improve the format. Right-click on this space between « Gender » and the bars and select « Format… ».

data science alias bar chart tableau mining

The « Sheet » tab appears. In « Worksheet » changes the text size to « 12 ».

data science alias bar chart tableau mining

What is good with data mining is that we aren’t obligated to make a perfect chart because we don’t have to present them in a report to managers or a meeting.

For example, if I had to present this chart in a report, it would be necessary to change the vertical title. But we only make a model so this change isn’t necessary.

Now, look at this rectangle. We can see « Exited », « 0 » and « 1 ».

data science alias bar chart tableau mining

« 0 » means that the client stayed in the bank and « 1 » means that the client left the bank. We can also see that client who left the bank are in orange so 25% for women and 16% for men. And the client who stayed in the bank are blue so 75% for women and 84% for men.

We did an excellent basic A/B test but it would be much easier to read if we replace « 0 » with « Stayed » and « 1 » with « Exited ».

With aliases we can do that. An alias is to replace the binary results « 0 » and « 1 » with « Stayed » and « Exited » because it’s not easy to remember the meaning of « 0 » and « 1 ».

There are 2 ways to do it : create a calculated field or use aliases.

We will use aliases. Know that aliases are not going to change the « 0 » and « 1 » in the dataset, this change is only in Tableau.

In « Dimensions », right-click on « Exited » and select « Aliases… ».

data science alias bar chart tableau mining

data science alias bar chart tableau mining

A small window appears. In this small window, you can create an alias for each value contained in the « Exited » variable.

The variable « Exited » contains the value « 0 » and « 1 ». For the value « 0 », we will create the alias « Stayed » to say that the client stayed in the bank. For the value « 1 », we will create the alias « Exited » to say that the client left the bank. Then click on the « OK » button.

data science alias bar chart tableau mining

Look, we can see the new values in the rectangle.

data science alias bar chart tableau mining

The values « 0 » and « 1 » have been replaced by « Stayed » and « Exited ».

Now that the aliases saved, we will take the variable « Exited » in « Dimensions » and move it to « Label ».

data science alias bar chart tableau mining

data science alias bar chart tableau mining

Look, we have our aliases « Stayed » and « Exited » on the bar chart.

In this ways, it’s easier for people to read the bar chart without asking what meaning of « 0 » of « 1 » values. « Stayed » and « Exited » are clearer.

Now you know how to use aliases so that people can easily read the binary values of a chart.

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

-Steph

Add a Reference Line

reference line tableau data science

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

In the previous article we learned how to work with aliases. We will learn how to add a reference line in our bar chart.

Before I start, I’ll show you a trick in Tableau.

In our bar chart we can see the labels in this order : percentage and below : « Stayed » or « Exited ».

We will reverse this order. You go in this rectangle.

reference line tableau data science

And you place the label « Exited » above the label « SUM(Number of Records ».

reference line tableau data science

Look, the label « Stayed » is above percentage.

reference line tableau data science

With that, we can understand the bar chart more easily.

Let’s add a reference line, let’s go . But before, I think you’d like to know why I’m talking to you about a reference line.

A reference line helps us to compare bar chart results with a benchmark. This benchmark is represented by this reference line.

In our case, the benchmark is the percentage of clients who left the bank in our sample of 10 000 people.

The first thing to do is find this percentage in our bar chart. To be able to do that, remove « Gender » from « Columns ».

reference line tableau data science

Boom, we have a new bar chart.

reference line tableau data science

Look, we only have the percentage of clients who left the bank and the percentage of clients who stayed in the bank.

We see that on our sample of 10 000 people, there are 20% of the clients who left the bank and 80% of the clients stayed in the bank. This means that the churn rate (client departure rate) is 20%.

What we’re going to do is we will add this churn rate in our A/B test. To return to our A/B test, press 2 times on Ctrl+Z or Command+Z or you can click 2 times on the « Back » button in the menu bar.

reference line tableau data science

Now we know that the average clients who left the bank is 20%.

We will add a horizontal line in the Y axis (Y = 20%) to compare the 20% of the churn rate and the 2 categories male and female.

Let’s go. Right-click on the vertical axis (Y axis) and select « Add Reference Line ».

reference line tableau data science

A window appears with several options.

reference line tableau data science

You have the choice to add a line, a band, a distribution or a box plot.

We will use the line for the entire table.

Click on the « Line » button and activate the « Entire Table » checkbox. In « Value » selects « Constant ».

reference line tableau data science

The constant is 20%, so it’s necessary that you put 0.20 in « Value ».

reference line tableau data science

It’s possible to put a label on this reference line. For example, if the line reference corresponds to a formula, the label displays the formula. But for our case, our constant is 20% and it’s already displayed on the vertical axis so we will select « None ».

reference line tableau data science

For the format of the line, select the continuous line and click on the « OK » button.

reference line tableau data science

We have our reference line is added to our chart.

reference line tableau data science

Here is what we can see. Female clients are more likely to leave the bank than average clients. Male clients are less likely to leave the bank than average clients. 

In our case, it’s obvious to see that because there is only 2 categories, men and women.

Now you know how to add a reference line in a bar chart.

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

-Steph

Understand How Your Workout Works In Your Body (Part 2)

body anatomy workout organs

I watched a Jamcore DZ’s video  and I learned good stuff.

If you didn’t read the Part 1, click here.

Knowing your type of morphology (ectomorph, mesomorph or endomorph) helps a lot to select a training program.

Morphology

morphology endomorph ectomorph mesomorph

Ectomorph

An ectomorph tends to be thin, and struggles to gain weight as either body fat or muscle. They can eat piles of food and stay looking the same, even when gaining muscular weight is their biggest goal. People who battle to gain muscle are often known as “hardgainers.”

Ectomorphs tends to have a lean build, long limbs, and small muscle bellies. Even if an ectomorph manages to put on weight, they may still look skinnier than they are, particularly in the calves and forearms.

Being an ectomorph doesn’t mean you’re doomed to be weak, though. You can still get remarkably strong, and you can be every bit as fit and healthy as someone who looks larger and more muscular. But if you want to gain weight, you’d better be prepared to eat like you’ve never eaten before.

Mesomorph

The mesomorph has a middle-of-the-road build that takes the best of both worlds. They tend to have wide shoulders, a narrow waist, relatively thin joints, and round muscle bellies.

In short, if you’re a mesomorph, you have a natural tendency to be fit and relatively muscular. Does this mean you can do nothing, eat everything, and get away with it forever? Definitely not—and you’re not necessarily healthier than the other two types, either. But you may be able to “bounce back” from being out of shape more easily than the other two body types, gaining muscle and burning fat with comparative ease.

Endomorph

The endomorph tends to gain weight and keep it on. Their build is a little wider than an ectomorph or mesomorph, with a thick ribcage, wide hips, and shorter limbs. They may have more muscle than either of the other body types, but they often struggle to gain it without significant amounts of accompanying body fat. If you ever feel like you gain 5 pounds simply walking by a donut shop, you may be an endomorph.

This definitely doesn’t mean that an endomorph can’t be healthy. They can be every bit as strong, healthy, and capable as the other two groups, and may actually have some strength advantages due to their additional muscle mass. But if and when they decide to lean out, it’ll take hard work!

If you don’t know your morphology type, you can click here .

It’s important to understand that our body is changing all the time due to the environment, age and food. That’s what this theory of Ecto, Meso and Endo is important for me to have results. I know there are people who don’t believe in this theory. My advise is to test this theory about yourself and see if it works or not.

There is also the skeleton and muscle genetics that influence muscle development.

You know, when I started to train seriously, my body responded well to exercises in the first year. I was happy, my body changed quickly. And all of a sudden BOOOOM, my body’s evolution stagnated. I started to worry and I think you know what I’m talking about.

Muscle mass

body anatomy workout muscle

Your muscle mass is decided by the stress that you will give to your muscle. The more you stress your muscle, the more it will respond. The more you rest, the more your muscle will respond. When you rest, your muscle recovers and your nervous system recovers. Understanding how much stress you put on your muscles is as important as knowing the difference between a set with high reps or low reps.

Look this example in my gym, click here.

You can’t walk around and talk to everyone in your gym like you’re in bar. The gym is not a bar ! When I started using the intensification methods, that’s where I really gain muscle.

Many people ask me if it’s possible to gain muscle and be shredded at the same time. The answer is that the first year of training, yes. In the beginning, you will gain muscle and burn fat, because you’re doing more intense physical activity than the year before.

But when you stop to train for more than 2 weeks , you have muscle atrophy and you start to store more fat.

If you spend several months without training, your muscles will turn into fat. The muscle is a tissue (soft tissue) and the fat is a tissue (adipose tissue). You understand !?! I know, I lost you and it’s the case for many people. The muscle and the fat are both cellular tissue.

It’s for this reason that you always need to continue to train because the more you train, the more you will gain muscle mass. And to gain muscle mass, you need to pay attention to your diet and recovery (sleep).

That’s the basis for gaining muscle. I know that on internet, there are several influencers like Christian Guzman , Steve Cook , Marc Fitt  who can say things that others dispute. But if you look deeper, there is only one way to gain muscle (regular training, diet and sleep), influencers explain only variants so don’t panic.

Conclusion

To explain it simply, you have your muscle and behind your muscle, there is fat. Fat is all the time waiting for the muscle works less to cover the muscle. The less you work on your muscle (muscle atrophy), the more the fat will cover your muscle. After several months without training, you will see in the mirror that you have lost your muscles. And you’re going to say : « Shit ».

Use a simple training program to understand the process for an effective training. It will be long. The 12-weeks training program is only a program that starts the process for your body to change, you need to train regularly all year long.

Stop listening to conflicting advice (it’s just for buzz), it’s the best way to stop you to have a better body. Choose a simple training program, adapt it to your schedule and use it all year long.

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

-Steph

Understand How Your Workout Works In Your Body (Part 1)

body anatomy

I watched a Jamcore DZ’s video  and I learned good stuff.

I will talk about the training or workout. It’s a simple subject but everyone is lost because of theories and training systems.

A training is a physical activity and we will return to the basic seeing the effects of a training in your body.

Why when we train we like to look at ourselves in the mirror and that makes us happy ? This is what we will see.

Training

training workout

Whenever we do an action, there is a reaction. When we’re training (lifting weights), there is an increase in oxygen consumption then, an increase in blood circulation and then, congestion of the muscle. Congestion depends on 3 important things : nutrition, H2O and muscle isolation.

Nutrition must be the best as possible. Water consumption must be high. Learning to master to isolate the targeted muscle during a exercise allows you to increase the possibility of having a huge muscle.

After the congestion (nutrition, H2O, isolation), there is sweat then, there is the release of hormones called endorphins. Endorphins will make you feel good. It’s happiness and it’s at this moment that you will look at the mirror to appreciate your body.

It’s the process of your body when you do a physical activity (training).

All training programs don’t work for everyone

training workout program

There are training programs that are good for you and some are not. To discover this, there are 2 principle :

  • Execution and mastery of the exercise

  • The experience that comes with time

These 2 principles aim to improve your ability to isolate muscle during exercise. Which means working the targeted muscle without the help of another dominant muscle. I wrote an article about it .

Joints

joints body

To master an exercise, it’s also necessary that you know your joints like oversupination, overpronation or valgus. Choose intelligently your exercises allows you to not break your joints (injury, tendinitis and muscle tears). Don’t do an exercise because someone told you it’s the best exercise in the world, choose an exercise adapted to your morphology.

For example for me, I know that I have the valgus , which means that when I do barbell curls to work my biceps, I have pain wrist. When I do barbell curls with an EZ bar, I have less pain. When I do dumbbell curls, I have no pain, it’s perfect. So for me, the best exercise for my biceps is the dumbbell curls and not the barbell curls because I know my joints.

Another example. When I walk, my feet are outside so when I squat my feet are outside and that’s happiness. If a person tells me that I have to squat with my feet in parallel because it’s the best position in the world, I could say : « Shut up, I know my morphology better than you because I have studied my morphology ».

The elements that influence the exercice’s performance are experience, joint’s flexibility and the respect of the biomecanics laws.

That’s why I’m telling you that you shouldn’t validate a piece of advice without having tested it on yourself. On internet, you can find video like « The 5 worst exercises ». These videos aren’t based on different type of morphologies, so they are not relevant information, it’s just to make buzz. If you want to work on your biceps, try several different exercises and keep the one that suits you best.

Here is another story. I watched a Christian Guzman’s video where he was doing the overhead triceps extension with an EZ bar. I did this exercise for 1-2 months and I noticed that I didn’t have a good feeling even if I had a good execution of the movement. I started looking for another exercise of the same type to work my triceps and I found the lying dumbbell triceps extension and now, it’s perfect.

I needed time to learn the exercise, realize that this exercise didn’t fit my morphology and find another better fit.

You may think I lost time testing this exercise for 1-2 months but I gained experience with this story. It’s by testing yourself the things you can know what is good and what is not good for you. Experience is the knowledge of things voluntarily acquired through pratice in the reality of life.

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

-Steph