Posts

The Bridge: Think with AI

This is an excerpt from a submission that I made to MIT Solve. It is in the format that the answers were required in, starting with the problem statement. How can innovative solutions and programs equip youth aged 18-24 with knowledge, skills, and confidence to navigate an AI-powered future? Provide a one-line summary or tagline for your solution. The Bridge: Think with AI: A program at the end of high school or before college that bridges the gap between AI over-reliant and avoidant/skeptical users. What specific problem are you solving? A significant number of young people—about one in five—learn about AI primarily through social media. Much of this information is unverified, shaped by the creator’s personal bias, designed to provoke strong emotions, or produced as promotional content for profit. Because of this fragmented and often misleading exposure, many youths develop extreme or narrow attitudes toward AI. Some view it as a competitor that will take their jobs and limit their fu...

Your ROSCA (chama) Loan Installment Amount or Number of Repayment Months Calculator

If your ROSCA (chama) allows you to borrow money at a set interest rate, please utilize the Installment Amount Calculator below to estimate how much of "small" payments - installments you need to make to cover the loan and the interest due.  You can use the Number of Months Calculator to determine how long it will take you to complete all payments if you want to set your own installment amount. NOTE: The number of months is rounded up. For example, if the calculator returns 4.1 or 4.7 , they both will read 5 months. The calculator assumes the interest is applied to a month not a year. The calculator assumes any payment made goes towards covering the interest due before it reduces the loan amount - Most loans are repaid by this method.  Installment Amount Calculator Enter loan amount: Enter Interest Rate - % (monthly interest rate): ...

Financial Mathematics CT-1 Finally Paid Off

Image
 How you may ask,  I sat for my financial mathematics paper in 2017. For those who do not know what this is, here is a summary. In the pursuit to be an actuary, there are exams that you are supposed to take and pass. Financial Mathematics (CT-1) was the name of one of it in the Institute and Faculty of Actuaries (IFoA) exam system before they changed the syllabus and consequently the exam paper names. I passed this paper on the first trial with what I would consider an excellent grade. The surprising bit is, as a unit/course, Financial Mathematics 1, was one of my three lowest scores in my entire undergraduate. So, this felt like part vindication that given different circumstances and motivation, I can do pretty well. I studied for the exam for probably more than 3 months, did almost all the past papers leading to that year and checked them against examiners' reports - thanks to the IFoA  repository . I did have a study buddy during this period. I did 2 more actuarial exa...

Self Joins in R

Image
Sometime back at work, I was faced with a dilemma.  I am one of those people who might get stuck on something because I have a "feeling" there is a shorter way to do it. Neither am I the biggest fan of writing several lines of code when there is an option to have less lines. I know that my tendency towards less lines of code sometimes is not the best bacause it might hinder readability.  To explain my dilemma, I have created a sample data frame as follows Code: data <-data.frame(   ID = c(12,12,34,36,47,47,58,68,77,77),   Call_Duration  = c(20,20,25,27,40,40,50,55,20,20),   Call_Reason = c("Reason 1", "Reason 2", "Reason 3", "Reason 1","Reason 3",                   "Reason 6", "Reason 4", "Reason 1", "Reason 2", "Reason 3")   ) Running the code above results to the below dataframe The Dilemma How can I easily find and count duplicate IDs so that I can ration call duration to...

Using R scripts in Power BI - Visualization

Image
If you code in R, you have in some cases worked with applications that enable you to use R. One of those that I constantly work with is Power BI.  There are many visual options available in Power BI including links to custom ones. On the visuals landing tab, you can pick R or Python Scripts as a method to create your desired visual. In this blog, I will demonstrate how to create the visual below (Some have called it a progress bar). Access you visuals page on Power BI, choose the R script, choose the table columns you need for the visual. Power BI will combine the columns into a data frame called dataset that is available for use. You can rename it data or whatever you decide. For this case, I have to create the dataset instead of using one from power BI  Create the data frame and set seed to replicate results set.seed(5) data <- data.frame(Facility = c(rep("A",3), rep("B", 3), rep("C",3), rep("D", 3)),                   Year = r...

Data Scientist Courses (edX vs DatCamp)

Image
I have had the opportunity to try several online learning platforms. Some of these have been LinkedIn Learning, Pluralsight, edX, DataCamp, Microsoft Learn among many more. You may find particular courses in all the platforms. On this post, I am going to outline chapters from the data science courses on edX and DataCamp. I Audited a data science course on edx around the year 2021. This was my first time going through a complete data science course. A lot of the material was new to me especially the coding. The theories on the other hand were more relatable. It was also the first time before my masters that I got to understand hypothesis testing and got to know why it is never "accept the null hypothesis" but always "Reject or fail to reject the null hypothesis". Some of the chapters on it were hosted outside edX and that is how I discovered DataCamp. The link to the full course is  HarvardX's Data Science Professional Certificate Around the second quarter of 202...

PREPARING FOR AND PASSING DP-600 EXAM: IMPLEMENTING ANALYTICS SOLUTIONS IN MICROSOFT FABRIC

I  successfully sat and passed the above exam in the last week of June and earned my Fabric Analytics Engineer Associate certificate. The exam costs $160 but I was lucky to get a voucher that covered the full amount. The voucher was earned by participating to completion in a Microsoft learn challenge that ran between March and April 2024. Exam Sections Plan, implement and manage a solution for data analytics Prepare and serve data Implement and manage semantic models Explore and analyze data If you are planning on taking the exam, this would be my advice to you after you have completely read through the study guide on your own. check out  Learn Microsoft Fabric with Will   a YouTube playlist going through the study guide. The material they went through and the sample questions after each video/section on the playlist are a good introduction to the sections and question style of   the exam. I am inclined to say that this takes the most credit on how I managed to ...

Customer retention vs a one time sale

Image
Companies are always in a bid to grow their market share. To achieve this goal, they resort into some of the following methods. Acquiring their competitors' market share, retaining their existing clients/customers, creating a new target group (expand the market share) which was not served by their product before etc. As a result, extensive research is done into promotion and pricing strategies as a means of meeting the goal.  For illustration, I will use the telecommunications industry. You walk into a store to buy a phone - say Samsung A14. The store has both locked and unlocked phones. The store attendant informs you that; Option A: Get the phone at full retail price $219 and pick a service provider of your choice.  Let say you get a free simcard from service provider A and their monthly plan fee is $20. Option B: Get the phone for $54 of the total retail price of $219 saving $165 in the process. But this is only if get a locked phone under Service provider B whose monthly p...

My Date and Time of Birth Dilemma

 Time There are 24 time zones in the world. These time zones are each 1 hour apart. I will in summary explain how the time difference comes across and what is used to determine the time in a region/country as a build up to the dilemma. From my Geography and Math classes, I remember there being questions like "what will be the time in country 'xyz' if the time in your country is  'this' and given that the country is on 'this' longitude while your country is on 'this'". The question required you to remember that the time difference between two consecutive longitudes is 4 minutes. (There are 360 longitudes and the globe does one full rotation in 24 hrs. The breakdown into minutes and longitude to longitude distance in time is 4 minutes). So, longitudes determine time. They are defined as imaginary lines that run from North to South, from pole to pole but measure distance from East to West (separates East from West). The most famous one is the prim...

What I remember from my Data Science skills interviews - Part 3

This is a continuation from my previous post (What I remember from my Data Science skills interviews - Part 2).  Note:  The example below is not an exact replica of any test I have done. #A PROGRAM THAT RETURNS THE SMALLEST SUBSET OF NUMBERS IN A SET(FROM SMALLEST TO LARGEST) WHOSE SUM IS GREATER THAN THAT OF THE REMAINING SUBSET (All the code is in R) values_check = function(k){   values<-max(k)   for (i in 2:length(k)) {     b<-sort(k, decreasing = TRUE)     if(sum(b[1:i-1])<sum(b[i:length(b)])){       values<-append(values,b[i])     }     if(sum(b[1:i-1])>sum(b[i:length(b)])){       break     }   }   sort(values) } Examples values_check(c(4,3,5,8,4,6)) Results: 5,6,8 a <- array(c(7,4,6,9,2)) values_check(a) Results: 7,9 Breakdown Before the check begins, arrange them from largest to smallest It is a given that the largest number will be in the answer su...

What I remember from my Data Science skills interviews - Part 2

Image
This is a continuation from my previous post (What I remember from my Data Science skills interviews - Part 1 ).  Note: The example below is not an exact replica of any test I have done.   #A FUNCTION THAT FINDS THE NUMBER OF FILES WITH SAY BYTE SIZE GREATER THAN 5000,  RETURNS THE NUMBER OF SUCH FILES  IN ONE ROW AND THE SUM TOTAL OF THE BYTES ON THE NEXT ROW. IT TAKES IN A FILE THAT MIGHT LOOK SOMETHING LIKE THIS AS THE INPUT. (All the code is in R) file<-c('good "2021-12-31T19:27:58.900z" 200 117',         'goodi "2021-12-31T19:08:31.760z" 200 4567',         'goodie "2021-12-31T16:56:14.124z" 200 5436',         'goods "2021-12-31T15:54:07.963z" 200 5453',         'goodle "2021-12-31T15:35:30.504z" 200 143') #The function library(dplyr) #for its verbs and the pipe operator filename = function(k){   #Split the strings at white spaces   st_split <- strsplit(k, split = " ")...

What I remember from my Data Science skills interviews - Part 1

As someone who wants to be more comfortable doing skills tests, I find myself applying to jobs sometimes for the sole purpose of having a feel of the test and challenging myself to complete it on time. On some occasions I really do well and on some I am left thinking "I wish there was no pressure to complete this test in the given time".  I would also note that the example below is not an exact replica of any test I have done.  #A FUNCTION THAT CHECKS IF A WORD(S) IS A PALINDROME (The Code is in R) palindrome_check = function(k){   k <- tolower(gsub(" ","",k))   newname <- c()   for (i in 1:nchar(k)) {     newname[i] <- (unlist(strsplit(k, split = "")))[nchar(k)-(i-1)]   }   k_new <- paste(newname, collapse  =  "")   ifelse(k_new == k, "This is a palindrome", "This is not a palindrome") } Examples palindrome_check("civic") Result: "This is a palindrome" palindrome_check("mother...

Feedback Scoring

Image
Intro A few days back I was pulled into a Data Center of Excellence (DCoE) meeting. The meeting got me thinking of a feedback scoring scenario and how I would go about handling it. Say you have different stakeholders in a company (like a hospital). They ask patients to fill out questionnaire/survey on their customer experience. The question I asked myself was, collectively, can all the surveys tell us how we are doing as a hospital on a particular issue. The assumption is that the  surveys have the same questions but the answer choices vary. One example question can be as below: How did you find your stay in the hospital? Very satisfying, Satisfying, Neutral, Dissatisfied, Very dissatisfying. Very satisfying, Satisfying, Average, Dissatisfying Satisfying, Average, Dissatisfying…. and so on Step by step process For all the surveys, breakdown the question and answer choices into a table (first two columns). If the tables exist in say an excel file, you could  continu...

SOME OF MY FAVORITE R FUNCTIONS.

Image
The functions and packages described below are not limited to the use cases discussed in this post. Some can be found in more than one package and can be applied in more than one way.  I use the iris dataset for the examples. It has 150 rows and 5 columns namely: Sepal.Length, Sepal.Width, Petal.Length, Petal.Width and Species  The pipe operator ( %>%) This function can be found in the dplyr package. It is one of those functions you learn earlier on when you start doing a lot of visualization and deep dive exploratory analyses. I envision it as a funnel to sift your bulk data through till you are left with what you want. While on the same package, there are some functions that are worth mentioning ends_with/starts_with : useful in selecting specific columns to keep based on pattern summarise : In most cases this should return a one row summary and is most useful after grouping data. Example (for the pipe function and the first two complimentary functions) iri...

Things I have learned as a Data Scientist/Analyst - intern in Healthcare in the past 8 weeks.

A Short Back story I am an MSc mathematics graduate who took lots of applied statistics classes.  I have a BSc Actuarial Science undergraduate degree too. The two courses sort of set me up on this path and that is how I found myself as an intern in the Enterprise Data & Analytics department of a hospital immediately after graduation. Now onto the list: The healthcare lingo will throw you off! For someone who has never liked being sick and thankfully has a very limited number of interactions with hospital personnel, there were some words that caught me off-guard from the first day at orientation. I mean "my doctor" worked pretty fine but I have to refer to them as "PCP - primary care provider". All the other physicians I called "the doctor". (My doctor : the doctor).  The first project requirements were given to me in this lingo too and I did not want to ask a question after each sentence because that would have turned out to be a lengthy conversation. ...