2022-11-5
This question has begun to plague the internet more and more each coming day. You can barely browse YouTube without being confronted with multiple advertisements telling you their website has the answer. The question: “Am I gay?” Most of these tests are nothing more than a few questions with either incredibly blatant infograbs about your age and gender or awfuly random inquiries about your favorite Disney movie. None of them seemed to combine both the aspects of entertainment and accuracy, and all of them seemed to use far to simple an agorithm to determine sexuality. How would I know the algorithm is too simple? Well…
I am not gay. Many of my friends insist I am. I tell them they are wrong and I’m just effeminate. They respond telling me that it’s okay to be who I am and they’re here to support me when I come out of the closet. To worsen the situation, every single “Am I gay?” test I take comes back saying that I’m gay. This is clearly an issue with the quality of the tests and not me failing to realize my true self. From this I set off to create perhaps the most mathematically advanced “Am I gay?” test there is for the sole purpose of making sure I’m not gay.
Now, you may be asking, “why did you make it for the TI 84 Plus CE instead of some better more accesibly platform like … the web?” First off, the TI 84 Plus CE is the best platform to ever exist, and second off, I am almost in love with my calculator. If you ask my friends to say something about me, there is a high chance it will be about my calculator. I take it everywhere: to school (obviously), to the movies, to football games, the list goes on. One day at marching band, someone suggested that I add a gay quiz to my calculator as a joke. I of course immediately realized the immense potential this had and decided to go make the joke a reality.
Now that you have the overall idea behind my motivation to create this I can start on the specifics. For the TI-84 Plus CE side of things, I wrote this in C using the CE C/C++ Toolchain which allows easy access to useful methods for displaying information to the calculator screen. Most of the graphics are done simply using the toolchain’s built in str display functions. I do avoid clearing the screen, as that causes flickering, and instead prefer writing over the previous screen and adding whitespace to fill every line. This creates a much less flickery experience.
I wanted to create a quiz that would just ask you, the quiz taker, a few multiple choice questions and would then give you a nice percentage breakdown of your predicted sexuality with the possibilities being gay, bisexual, and straight. Basically, if you were to get 70% straight and 30% gay, that would mean you answered 70% of the questions like you were straight and 30% like you were gay. This is not straight forward, as some of the questions could have absolutely no assosiation with sexuality, while some could be answered by multiple sexualities the same way. If we want to accurately measure these proportions and prove once and for all that I am not gay, we’re going to need an aglorithm.
Note: This is the meat and potatoes of this article, but if you aren’t really into technical stuff, just skip down to the questions section.
For the algorithm, for simplification, someone can have same-sex feelings, or opposite-sex feelings. This means each question can give away the info that they have same-sex feelings, do not have same-sex feelings, have opposite-sex feelings, and/or do not have opposite-sex feelings.
sexuality | same-sex | opposite-sex |
---|---|---|
gay | true | false |
bisexual | true | true |
straight | false | true |
I do not have asexuality programmed in on this test and do not really plan to do so as it would be quite a bit of a pain to add to the program at this point.
This table shows how the different response weights are treated by the program.
weight | gay | bi | cis |
---|---|---|---|
nil | maybe | maybe | maybe |
gay | true | false | false |
bi | false | true | false |
cis | false | false | true |
cisbi | false | maybe | maybe |
cisgay | maybe | false | maybe |
bigay | maybe | maybe | false |
For calculating the final percentages, I have two rules:
From this we can create recursive equations to solve for the final gay portions, bisexual portions, and straight portions.
is the final straight portion, is the final bisexual portion, and is the final gay portion. is the number of cis weighted responses, is the number of bi weighted responses, and is the number of gay weighted responses. Variables like , , , and are combined weights and are the number of cisgay, cisbi, bigay, and nil weighted responses respectively. is the total number of responses.
Below is a system of equations that could theoretically be solved to give exact answers for the three portions system.
I have not solved it.
Theoretically it should be solvable as there are only three unknowns, , , and , and there are at least 3 equations. I am not sure the fourth equation is neccesary to solve the system, but I am not an expert at this sort of thing either. What we can do is plug in guess unknowns on the left sides of the first three equations, and then calculate what that would make the unknowns on the right sides. We can then use these new unknowns as our new guess unknowns and repeat. This will converge to a set of portions which solve the system and is the system I use in this program. In practice, this solution works very well and will usually give highly accurate solutions to the equation after only 10 iterations through the equations. Additionally, it only requires 3 of the equations to use the recursive method, proving that the fourth equation is redundant.
Now this is just the algorithm of course, we still need to get questions for the quiz. For this I played the easy move and took most of them from this quiz, however some answers and questions have been modified. Because the online quiz does not show the weights of the answers to each question, I had to choose my own weights. Those are all simply stored in a two dimensional array along with the 11 questions and their possible answers.
The Gay Quiz TI was both a success and a faliure. I showed the quiz to a multitude of my friends, and every single one found it quite fun. The calculator form is a great hook. “Would you take this online gay test?” just doesn’t have the same ring as, “My calculator will calculate how gay you are.” The number of people who ended up taking the test on my calculator is ridiculous and probably close to 80 people. Quite a few of those people asked me actively to take the test, and since I always have my calculator on me, I was able to let them take it as well.
Irony pulled a cruel trick on me through this project. To put it simply, I tried to make the most accurate gay test I could, I poured my mathematical heart and soul into it, and it betrayed me. My results are 82.3% gay, 17.6% bisexual, and 0.1% straight. Maybe betray is a harsh word to use here. Perhaps I did succeed in making a perfect test after all. Perhaps my friends and the tests and my systems of equations could see what I was blind to all along. Maybe it’s time I read the writing on the wall and realize that the programs weren’t wrong about me. I was.
Nahhhh…
The program’s probably just wrong. I mean, I can’t possibly be gay.
Right?
This article is somewhat adapted from the readme on the GitHub page for this program. You can download it and run it on your own TI-84 Plus CE and look at the code for your own enjoyment. Again, all thanks to the wonderful contributors on the CE C/C++ Toolchain! Without their work this wouldn’t have been made.