Word frequency and sentiment analysis of twitter messages during Coronavirus pandemic	The Coronavirus pandemic has taken the world by storm as also the social media. As the awareness about the ailment increased, so did messages, videos and posts acknowledging its presence. The social networking site, Twitter, demonstrated similar effect with the number of posts related to coronavirus showing an unprecedented growth in a very short span of time. This paper presents a statistical analysis of the twitter messages related to this disease posted since January 2020. Two types of empirical studies have been performed. The first is on word frequency and the second on sentiments of the individual tweet messages. Inspection of the word frequency is useful in characterizing the patterns or trends in the words used on the site. This would also reflect on the psychology of the twitter users at this critical juncture. Unigram, bigram and trigram frequencies have been modeled by power law distribution. The results have been validated by Sum of Square Error (SSE), R2 and Root Mean Square Error (RMSE). High values of R2 and low values of SSE and RMSE lay the grounds for the goodness of fit of this model.

Power law has been deployed in various studies. In , the authors explicitly focus on the presence of power law in social networks and use this property to create a degree threshold-based similarity measure that can help in link prediction. In an attempt to model the self similar computer network traffic, the authors claim that during fragmentation of the data into Ethernet frames leads, the power spectrum of the departure process mimics power law similar to that of observed traffic. They also state that the power law was independent of the input process . It was shown in  that internet topologies also can be modelled by power law. While investigating the presence of power laws in information retrieval data, the authors showed that query frequency and 5 out of 24 term frequency distributions could be best fit by a power law . Power law has found immense applications in different domains. In this paper, we intend to use it to model the word frequencies of twitter messages posted during this time.

Introduction	Catastrophic global circumstances have a pronounced effect on the lives of human beings across the world. The ramifications of such a scenario are experienced in diverse and multiplicative ways spanning routine tasks, media and news reports, detrimental physical and mental health, and also routine conversations. A similar footprint has been left by the global pandemic Coronavirus particularly since February 2020. The outbreak has not only created havoc in the economic conditions, physical health, working conditions, and manufacturing sector to name a few but has also created a niche in the minds of the people worldwide. It has had serious repercussions on the psychological state of the humans that is most evident now. One of the best possible mechanisms of capturing human emotions is to analyze the content they post on social media websites like Twitter and Facebook. Not to be surprised, social media is ablaze with myriad content on Coronavirus reflecting facts, fears, numbers, and the overall thoughts dominating the people's minds at this time. This paper is an effort towards analysis of the present textual content posted by people on social media from a statistical perspective. Two techniques have been deployed to undertake statistical interpretation of text messages posted on twitter; first being word frequency analysis and second sentiment analysis.

Statistical analysis of tweets	In this section, we present the details of the analysis performed on the data obtained pertaining to Twitter messages from January 2020 upto now, that is the time since the news of the Coronavirus outbreak in China was spread across nations. The word frequency data corresponding to the twitter messages has been taken from . The data source indicates that during March 11th to March 30th there were over 4 million tweets a day with the surge in the awareness. Also, the data prominently captures the tweets in English, Spanish, and French languages. A total of four datasets have been used to carry out the study. The first is the data on Twitter Id evolution reflecting on number of tweets and the other three are unigram, bigram and trigram frequencies of words. In the following subsections analysis of each has been undertaken.

A well known and profoundly researched as well as used statistical tool for quantitative linguistics is word frequency analysis. Determining word frequencies in any document gives a strong idea about the patterns of word used and the sentimental content of the text. The analysis can be carried out in computational as well as statistical settings. An investigation of the probability distribution of word frequencies extracted from the Twitter text messages posted by different users during the coronavirus outbreak in 2020 has been presented. Power law has been shown to capture patterns in the text analysis , . Sentiment analysis is a technique to gauge the sentimental content of a writing. It can help understand attitudes in a text related to a particular subject. Sentiment analysis is a highly intriguing field of research that can assist in inferring the emotional content of a text. Sentiment analysis has been performed on two datasets, one pertaining to tweets by World Health Organization (WHO) and the other tweets with 1000 retweets. The sentimental quotient from the tweets has been deduced by computing the positive and negative polarities from the messages. The paper has been structured as follows. The next section presents a brief overview of some work in the area of word frequency analysis and emergence of power law.

Also, heavy tails are observed specifically in the case of unigrams and bigrams. A good fit by power law connotes a difference in the behaviour of tweet messages when compared to literary documents like novels and poems which are replicated by Zipf's law with exponents close to 1. In the following section, we investigate the goodness of fit of our proposed model using measures: SSE, $R^2$ and RMSE.

Sentiment analysis has been conducted to understand the general attitudes of the twitter users at this time. Both tweets by general public and WHO were part of the corpus. The results showed that the majority of the tweets had a positive polarity and only about 15% were negative.

Word frequency analysis and power law	Several researchers have devised statistical and mathematical techniques to analyze literary artifacts. A substantially significant approach among these is inferring the pattern of frequency distributions of the words in the text . Zipf's law is mostly immanent in word frequency distributions , . The law essentially proclaims that for the words' vector $x$, the word frequency distribution $\nu $ varies as an inverse power of $x$. Some other distributions that are prevalent include Zipf–Mandelbrot , lognormal , , and Gauss–Poisson . Such studies have been conducted for several languages such as Chinese , Japanese , Hindi  and many others . Not only single word frequencies, but also multi-word frequencies have been exhaustively explored. One of the examples is  wherein bigram and trigram frequencies and versatilities were analyzed and 577 different bigrams and 6,140 different trigrams were reported. A well known distribution is the power law. This “non-normal" distribution has been a subject of immense interest in the academic community due to its unique nature. The rightly skewed distribution is mathematically represented as follows: where a is a constant and b is the scaling or exponential parameter.

Conclusion	The paper is an effort towards deriving statistical characterization of tweet messages posted during the Coronavirus outbreak. The spread of the disease has created an environment of threat, risks and uncertainty among the population globally. This response can be gauged from the immensely high number of tweet messages corresponding to the outbreak in a short duration of 2-3 months. In the present work, data related to tweets made since January 2020 have been analyzed with two major perspectives: one understanding the word frequency pattern and the second sentiment analysis. The study has resulted in the following observations. The number of twitter ids tweeting about Coronavius has increased rapidly with several peaks during February and March. An empirical analysis of words in the messages was made by determining their frequencies of occurrence. The most frequent words were Coronavirus, Covid19 and Wuhan. Unigram, bigram and trigram frequencies (the top 1000) were modeled. It was seen that all of them followed the rightly skewed power law distribution with quite heavy tails in the first two cases. The exponential parameters for the same were determined to be -1.273 for unigram, -1.375 for bigram and -0.5266 for trigram.

Statistical analysis of tweets ::: Unigram, Bigram an Trigram word frequency analysis	Three forms of tokens of words have been considered for the study viz. unigram, bigram and trigram. These represent the frequencies of one word, two words together and finally three words coupled. The dataset provides the top 1000 unigrams, top 1000 bigrams and the top 1000 trigrams. Fig. FIGREF3 gives the visualization of the word cloud for unigrams. It can be seen that Coronavirus was the most frequent word. Fig. FIGREF6, FIGREF7, and FIGREF8 depict plots for the Rank or Index vs frequency distributions for unigram, bigram and trigram respectively. The graphical visualization well demonstrates that the nature or the pattern of the data follows power law. The power law distribution can be seen to closely fit the data. The exponents in case of unigram and bigrams are -1.273 and -1.375 respectively while for trigram it gives a smaller value of -0.5266. The computed parameters are reported in Table TABREF9.

The plots for the same have been depicted. The goodness of fit for the model was determined using SSE, $R^2$ and RMSE. The results were found to be satisfactorily good. The model can be used to determine the pattern of the words used during this time. The sentiment analysis was performed on tweet messages by general public and WHO. The polarities of the individual messages were determined and a histogram of the same was plotted. It could be observed that most of the messages belonged to the neutral and positive categories. With WHO messages, $60\%$ of the messages were found to be positive and with general messages, $29\%$ were found to be positive and $54\%$ neutral. In both the cases, just about $15\%$ messages were of negative sentiment. The results obtained are a great reflection of the sentiments expressed worldwide during this pandemic.

Evaluating the Goodness of fit of the model	The quality of fit of the data using power law distribution has been evaluated using three goodness of fit metrics: SSE, $R^2$ and RMSE. The value obtained for the three datasets with the three forms of token of words has been shown in Table TABREF9. We obtain a high value of $R^2$ in all the three cases: unigram (0.9172), bigram (0.8718) and trigram (0.9461). Also, the values of SSE and RMSE obtained in all the three cases is quite low. This confirms that power law provides a good model for the frequency data of the tweet messages.

Statistical analysis of tweets ::: Twitter id evolution	First, we consider the data corresponding to the number of twitter ids tweeting about coronavirus at a particular time. Fig. FIGREF1 depicts the pattern of the twitter id evolution. A couple of peaks can be observed in its evolution in the months of February and March.

Section 3 details the analysis of the twitter data. Section 4 provides a discussion on the obtained results. Section 5 provides a discussion on the scope of sentiment analysis and outlines the methodology of sentiment analysis adopted in this paper. Section 6 presents the results of the sentiment analysis performed on the two datasets mentioned above. The final section concludes the paper.

Sentiment Analysis of Twitter Messages	Sentiment analysis is a fast growing field due to its capacity to interpret emotional quotient of a text.It has often been defined as a computational study that relates to people's attitudes, emotions and opinions towards a subject . The key intent of sentiment analysis is to gauge opinions, identify hidden sentiments and finally to classify their polarity into positive, negative or neutral. Sentiment analysis has been immensely used in customer reviews , news and blogs , and stock market  to name a few. Several methods have been deployed for sentiment analysis including Support Vector Machines , Naive Bayes , and Artificial Neural Networks . There have also been several papers that have provided algorithms for sentiment analysis on twitter posts ,, , . In the present work, we use the Python built-in package TextBlob  to perform sentiment analysis of tweets pertaining to the coronavirus outbreak. The analysis has been conducted on two datasets: one corresponds to the tweets made by WHO and the other is the one that contains tweets that have been retweeted more than 1000 times. The polarity values of individual tweets have been computed.

Results of Sentiment Analysis of Twitter Messages	In this section, we provide a detailed discussion of the results obtained from the sentiment analysis of the two datasets. Fig. FIGREF11 corresponds to the histogram of sentiment polarities of tweets on Coronavirus by general public. It can be seen that majority of the tweets have a neutral sentiment followed by positive. The same can be inferred from Table TABREF10 that shows that around 54$\%$ tweets are neutral, 29$\%$ positive and a mere 15$\%$ is negative. Fig. FIGREF12 corresponds to the histogram of sentiment polarities of tweets on Coronavirus by WHO. It can be seen that majority of the tweets have a neutral and positive sentiment. Table TABREF10 that shows that around 60$\%$ tweets are positive, 24$\%$ neutral and a mere 15$\%$ is negative. This shows how WHO is trying to retain the positive spirit through its social media accounts. Fig. FIGREF13 and FIGREF14 represent the histograms produced by removing the neutral tweets. It readily reiterates that the positive emotions in the tweets are higher than negative ones.

This is a great sign that indicates that the humans are still focusing more on the positive and sharing the same light through their messages.

The interpretation of these values is as follows: polarity $>$ 0 implies positive; polarity $<$ 0 implies negative; polarity $=$ 0 implies neutral. The polarities range between -1 to 1. These polarity values have then been plotted in a histogram to highlight the overall sentiment (i.e. more positivity or negativity). The plots have been given in Fig. FIGREF11, FIGREF12, FIGREF13, and FIGREF14. Table presents the results of the percentage of positive, negative and neutral tweets based on the polarities in the dataset. The following section outlines an analysis of the results obtained.

Question: Which word frequencies reflect on the psychology of the twitter users, according to the authors?
Answer: unigram, bigram and trigram