<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joseph Lugo on Medium]]></title>
        <description><![CDATA[Stories by Joseph Lugo on Medium]]></description>
        <link>https://medium.com/@josephlugo?source=rss-3dae637e4949------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QOimYhsC17jACgCD.</url>
            <title>Stories by Joseph Lugo on Medium</title>
            <link>https://medium.com/@josephlugo?source=rss-3dae637e4949------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 04:54:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@josephlugo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Relationship Response Times]]></title>
            <link>https://medium.com/@josephlugo/relationship-response-times-22f7018ad16f?source=rss-3dae637e4949------2</link>
            <guid isPermaLink="false">https://medium.com/p/22f7018ad16f</guid>
            <category><![CDATA[millennials]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sms]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Joseph Lugo]]></dc:creator>
            <pubDate>Wed, 26 Apr 2017 01:31:37 GMT</pubDate>
            <atom:updated>2024-01-06T00:04:51.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOjWK0OeXtYsx3Gy1pBnRg.jpeg" /></figure><p>This is a story all about how… (I will spare you all by not making a terrible Fresh Prince parody) my girlfriend had the preconception that I was much slower at responding to text messages than her. Being a Stats kid at uWaterloo, I found it very appropriate to try and get some facts to back that up. I just finished reading <a href="http://dataclysm.org/">Dataclysm</a> by Christian Rudder and the idea of combining data with social science was still fresh in my mind. So over the next year (2015) I would turn to the data in an attempt to prove her WRONG.</p><h3>Trust the <a href="https://twitter.com/JoelEmbiid">Process</a></h3><p>So when I was just starting this, the main problem I had was figuring out how to collect this data. Thus started the search for a reasonable solution. My first thought was to track everything in a google sheet by hand. This is clearly the wrong way to do this and I quickly realized it after entering two rows in the sheet. Hmmm what else could there be? I started googling like a madman and found the app <a href="https://ifttt.com/">IFTTT</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*hZL8Qw0KHOeldyDqiXgs6A.png" /></figure><p>This was an app that allows the users to setup automated processes on their device. Short for “If This Then That”, you could grant the app permissions to other apps on the device and create conditional statements. This got the gears turning and I found out that I could set a condition where IF I got a text THEN I could push the information to a google sheet. This was a great solution to automating the process of recording all the data. Now the only thing left to do was wait.</p><h3>What Did you Find Out?!</h3><h4>Were you Faster?</h4><p>Throughout the collection phase, I would periodically take a look and see what the response times were like (ps. she never knew about any of this for at least 2 months). The first thing I did was look at some summary stats like the averages for the both of us, which ended up being <strong>24.79</strong> minutes for me and <strong>22.46</strong> minutes for her. <a href="https://en.wikipedia.org/wiki/Damn_(Kendrick_Lamar_album)">Damn</a>, you would think that by being the one running this, I would try to respond faster. I decided to look at the density plot for this data by month in R using the <a href="http://ggplot2.org/">ggplot2</a> package and the results were not too surprising. Looking at the plot below you can see that right around 20 minutes is where both our curves peak. This is expected given the averages mentioned above. I provided a threshold of 180 minutes to simplify this process and get rid of outliers that were not representative of normal texting behaviour. If response times took longer than this, it could usually be attributed to something like sleeping, working, or just being together. You can also see that April and December might look a little off. This is because to my surprise, the app stopped recording the text messages and the spreadsheets were no longer being updated. This made April and December very unreliable and messy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*voIV_qm0e-1gqe4upG8A_A.png" /></figure><h4>How about the words in the text messages?</h4><p>This is where things started to get more interesting. Realizing I had the text messages as well, I started to get into thinking about how I could further use this information. I started by looking at text messages containing iterations of “LOL”. This included “lool”, “lol”, “ LOOL”, etc. The hypothesis was that we might respond faster if the text was funny. You get excited and want to respond back with something even funnier. Or just relay the fact that you really appreciate the humour of that last text. After looking at these response times, the new averages were <strong>21.90 (- 2.89) </strong>minutes<strong> </strong>for myself and <strong>22.38 (- 0.08) </strong>minutes<strong> </strong>for her. Hehe 😏. So the secret might be to text something funny if you want someone to respond to you. I also made the same density plots by month and by whether or not an iteration of “LOL” was in the text or not. Below you can see that the peaks for the both of us are much more similar and some of mine are even above hers. Again noting that April and December are not really worth looking at due to the lack of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PO_I0FJnuDccQ2H1pYHtaA.png" /></figure><p>Thinking more about the actual text messages themselves, I decided to take a deeper dive into the words used and not just “LOL”. Below I have included the top 20 used words for myself and my girlfriend. This was done using natural language processing (NLP) libraries in Python. You can see that we both like using “lol”, maybe too much? Considering the amount of times the both of us think/talk about food, I was really surprised that “hungry” or “food” didn’t make this list. You can also see some words that look like they’re cut off, but that was totally intentional. This is known as <a href="http://scikit-learn.org/stable/modules/feature_extraction.html#customizing-the-vectorizer-classes">stemming</a> and is very common in NLP. This allows you to reduce the amount of words being considered and also takes into account the variations of words. A situation where this would be used is for the word “think”. Versions of this can be “thinking” or “thinks”, where there are different endings but the base word is the same. So all of these would be classified under “think” to reduce the amount of words being looked at.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*fEir1Jpfy5pPvc3KGT-THA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*tnMZkAHdDvdWodKE_w9f0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*pyCPPC0GTjT1hT0bRtrm_g.png" /></figure><p>Another topic I wanted to explore was feature importance of the words and other explanatory variables as well. I did this by using <a href="http://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_importances.html">tree based methods</a> in the <a href="http://scikit-learn.org/stable/">scikit-learn</a> library in Python. This uses random forest models and ranks the features after the forests are built. I used the response time as the response variable and all the other columns, including the words, as the explanatory variables. So the higher the importance value, the more important the variables are for providing information about the response time. You can see the top 20 variables in the table to the left which includes variables in the data set as well as the words used in the text messages. I am only going to go over the top two in this post and maybe update it later, maybe…</p><p>The top variable in the list is the “Hour” at which we text. At first I didn’t really think the hour of the day made much of a difference to how we text. Then I went to the data and took a quick look. As you can see in the plot below there is quite a lot of variability in the bars. You can clearly see when we are sleeping as there is no data between 4am and 6am. You can also see that around 12am and 2am we seem to be much quicker in responding to one another. I think this is because we are both in bed and not really doing anything else. It is the end of the day and we both have less distractions around us besides Netflix. During the day, we are both doing things and are not completely focused on one another. But as it gets later, things settle down and we have more time for each other. There is also a greater sense of urgency because we know the other person could be going to sleep any minute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*zeDkfzdbODybMPL-DaBSkA.png" /></figure><p>There was also “prev_response_time”. This is something that I added a bit later. It is the other person’s previous response time. The thought process behind adding this was from the pettiness of people. We’ve all been there, “They took 40 minutes to text me back. Why would I respond in 5?”. Turns out it is something we go through as well, even if both of us won’t admit it. Although the opposite can be true as well, “Oh man she texted back right away, I should probably text back quick too.” Seems like the <a href="https://en.wikipedia.org/wiki/Golden_Rule">golden rule</a> applies to everything, including texting people.</p><h3>So What?</h3><p>After looking at the analysis and results I can’t say I have changed very much. Although, seeing the most frequently used words made me think about trying to expand my vocabulary. Maybe I should read more books instead of <a href="https://www.reddit.com/r/uwaterloo/comments/5ibr95/fuck_it_if_this_post_receives_2000_upvotes_i_will/">reddit posts</a> and comments ¯\_(ツ)_/¯. There is still so much I can explore but I will save that for another post. Learning about social behaviour is fascinating especially when it is your own. Even when I knew I was running this experiment, I still didn’t text any faster. If there was a moral to the story, it would probably be something like data isn’t always on your side.</p><p>Special thanks to the girlfriend, all the people that said I was weird for doing this, and the guy that let me borrow Dataclysm/ the proofreader. Couldn’t do this without any of you! Check out my <a href="https://github.com/JoeLugo/Response-Study">Github</a> page to get more detail about the code I used and feel free to leave comments. I can’t guarantee I’ll be open to all of them but I will certainly read them and at least pretend to care about them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22f7018ad16f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>