<?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 Naga Durga Bhavani. Kokkira on Medium]]></title>
        <description><![CDATA[Stories by Naga Durga Bhavani. Kokkira on Medium]]></description>
        <link>https://medium.com/@bhavanikokkira?source=rss-514a8d216331------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vLYiHiMG0cGlijyd</url>
            <title>Stories by Naga Durga Bhavani. Kokkira on Medium</title>
            <link>https://medium.com/@bhavanikokkira?source=rss-514a8d216331------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:53:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bhavanikokkira/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[The Magic of Central Limit Theorem: Making Sense of Numbers]]></title>
            <link>https://medium.com/@bhavanikokkira/the-magic-of-central-limit-theorem-making-sense-of-numbers-0bbec820b53e?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/0bbec820b53e</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Thu, 28 Mar 2024 03:03:40 GMT</pubDate>
            <atom:updated>2024-03-28T03:03:40.157Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Introduction :</em></h4><p><em>Welcome to the world of statistics, where numbers help us unlock the mysteries of vast amounts of information. Today, we’re diving into the Central Limit Theorem (CLT), a handy tool that simplifies the process of understanding big groups of data. Join me as we explore why CLT is so important, how it helps us even with small samples, and where we can see it in action.</em></p><h4>What is Central Limit Theorem?</h4><p><em>The Central Limit Theorem is like a magic trick in statistics. It says that if you take a bunch of random samples from a big group of things (like cookies with different numbers of chocolate chips), and you find the average of each sample, those averages will always make a special shape called a bell curve, even if the original group of things doesn’t look like that at all! So, instead of having to count everything, we can just look at a few samples and still get a good idea of what the whole group is like. It’s pretty cool, right?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Wzj_FxX2-v0wXD7W.png" /></figure><h4>Real-Life Applications :</h4><p><em>Now, let’s leave the bakery and think about elections. During election time, pollsters want to know what people think, but they can’t ask everyone. So, they take small groups of people from different areas and ask them about their opinions. By using CLT, they can predict what the whole population thinks based on these smaller groups. It’s kind of like guessing the flavor of a cake by tasting a tiny piece — CLT helps us make good guesses about big things by looking at smaller parts.</em></p><h4>Why is CLT Important?</h4><ul><li>CLT is like a magic trick in statistics. It lets us understand big datasets without having to look at every single piece of data. Imagine trying to measure the heights of all students in a school. That would take forever!</li><li>CLT comes to the rescue by letting us just measure a few students from different classes, find their average height, and then guess the average height of all students. It’s super important because it works in all sorts of situations, even when the data seems messy or doesn’t follow a clear pattern.</li><li>CLT shows us that when we take lots of samples and find their averages, those averages always make a special shape called a bell curve, no matter how the original data looks.</li></ul><h4>How Does CLT Work?</h4><p><em>CLT works by saying that when we take a bunch of samples from a big group of things and find their averages, those averages will always form a bell curve shape, no matter what. This happens regardless of how the original data was spread out, giving us a consistent way to analyze data. In simple terms, CLT lets us figure out things about a whole group by looking at just a small part of it.</em></p><h4>The Role of CLT in Data Analysis :</h4><p><em>CLT is like a guide for statisticians and researchers. It helps us make sense of complex datasets. By using CLT, we can make educated guesses and decisions even with just a small amount of data. It’s a super handy tool used in many fields like economics, biology, psychology, and sociology, helping us make better decisions and discoveries</em></p><h4><em>Conclusion :</em></h4><p><em>So, there you have it! The Central Limit Theorem might sound fancy, but it’s really just a cool trick that helps us understand data better. From cookies to elections to school heights, CLT is like our trusty guide, helping us make sense of the world one number at a time. Keep this magical tool in your back pocket, and you’ll see how numbers can reveal fascinating stories about the world around us.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0bbec820b53e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Techniques :]]></title>
            <link>https://medium.com/@bhavanikokkira/what-is-scale-in-statistics-and-why-do-we-use-it-876d03834f1f?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/876d03834f1f</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Tue, 26 Mar 2024 03:00:28 GMT</pubDate>
            <atom:updated>2024-03-26T03:02:00.266Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is Scale in Statistics and Why Do We Use It?</h4><p><em>In statistics, scale refers to the range or spread of the values in a dataset. We use scaling to make data more manageable and comparable, especially when dealing with variables that have different units or vastly different ranges. Scaling helps us understand and analyze data more effectively by putting all the numbers on a similar scale.</em></p><h4>Where We Use Scaling ?</h4><p><em>Imagine you’re comparing the prices of houses based on their sizes and number of rooms. The size of the house might be measured in square feet, while the number of rooms is a simple count. These two measurements are on different scales, which can make comparison difficult. Scaling helps by putting both measurements on the same scale, making it easier to see how they relate to each other.</em></p><p><strong>Example</strong></p><p><em>For instance, if one house is 2000 square feet and costs $300,000, and another is 1500 square feet and costs $250,000, scaling helps you compare these prices more accurately relative to their sizes.</em></p><h4><strong><em>Normalization</em></strong></h4><p><em>Normalization rescales the values of a variable to a range between 0&amp;1. It’s useful when you want to compare variables with different units or scales.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*W9RpTJM65gGsMu5H_3_6ow.png" /></figure><p><strong><em>Example :</em></strong></p><p><em>Consider a dataset containing features with different ranges of values, such as student scores on different exams. One exam might have scores ranging from 0 to 100, while another might have scores ranging from 0 to 1000. Normalization can be applied to bring all these scores to a common scale, facilitating fair comparison and analysis across features.</em></p><h4>Data Frame :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*m8iW7NZlCSNDRx5EPD_C-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*ZD623i_5aEOvpZn9Btgk1w.png" /></figure><p><strong>Code for the Normalization By using Functions :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*EbNRlup7pgs7Wx3CLACfhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*1UTs_-07ZjooJ7pA0p7YjA.png" /></figure><h4>Distributions :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*BYAk0QiOegAn_SucIEH5Og.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*YqHUy_OLRarokGhMIS7KEw.png" /></figure><h4>Robust Scaling :</h4><p><em>Robust scaling is a method that adjusts the range of values to minimize the impact of outliers. It adjusts the numbers so that one or two really big or really small values don’t mess up the whole comparison game.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*vlHiBEUcilE9zjSV.png" /></figure><p><strong><em>Example : </em></strong>Imagine you’re analyzing a dataset that includes income data, where a few individuals have exceptionally high incomes. Robust scaling would help by scaling the data in a way that these extreme values don’t overly influence the analysis.</p><p><strong>Code For Robust scaling By Using Functions :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4uV3pXu4nSDLlGvVn-RYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*ICkziAVwiba2nqYQjL1zzw.png" /></figure><h4>Distributions :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*ZRc185R4cHdmBRTdoAgRVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*uYctkI3LdIdfSzAvqkFJTw.png" /></figure><h4>Mean Normalization :</h4><p><em>Mean normalization shifts the values of a variable so that they are centered around the mean, with a mean of 0. It’s useful when you want to compare variables while preserving their original distribution.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*kaxfmti649NbzEAT.png" /></figure><p><strong><em>Example For Mean Normalization</em> : </strong><em>Suppose you’re analyzing a dataset of exam scores, and you want to compare the performance of students across different subjects. Mean normalization would adjust the scores so that each subject’s average score is centered around 0, making it easier to compare relative performance.</em></p><p><strong><em>Code For The Mean Normalization :</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*DCfXN1AGLEbOPdUHbYs0XA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*5m3SRJKrSGry1Rle_pJUwg.png" /></figure><h4>Distributions :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*2ekqQWJ1W1WFN7KeBPFVyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*zQ5hgrzaBig5wUkfHguijg.png" /></figure><h4><strong>Standardized Deviation :</strong></h4><p><em>Standardized deviation, refers to the process of transforming data so that it has a mean of 0 and a standard deviation of 1. This transformation helps in comparing variables on a common scale, making it easier to analyze and interpret their relative positions and variability.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/0*lV5LQspXDW3DRkSC.jpeg" /></figure><p><strong><em>Example Of Standardized Deviation : </em></strong><em>Standardized scaling helps in identifying outliers more effectively by transforming variables to have a mean of 0 and a standard deviation of 1, making extreme values more apparent.</em></p><p><strong>Code for the Standardized Deviation :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*ejXRdd8bRx1UD_iBpKmbNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*Z5vhr3zhzw9SR6uXMO7JwA.png" /></figure><h4><strong>Distributions :</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*7PVjyRiLpQlF7G6ijDe_Pg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*8apqPx9gueToCk1nbtwvCQ.png" /></figure><h4>Maximum Absolute :</h4><p><em>Maximum absolute scaling scales the values of a variable to a range between -1 and 1 by dividing each value by the maximum absolute value. It’s useful when you want to preserve the sign of the values while scaling.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/0*qL2-zIwODRvytU6k.jpeg" /></figure><p><strong><em>Example Of Maximum Absolute</em></strong> : <em>Let’s say you have a dataset of temperatures recorded in both Celsius and Fahrenheit. You want to scale these temperatures while preserving their original signs. Maximum absolute scaling would help in this situation by transforming the temperatures to a common scale between -1 and 1 without altering their signs.</em></p><p><strong>Code For the Maximum Absolute :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*TF1R5SqDW_7zhiUXSf1mHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*JeDRb_jDr6CRBQ5EVqu-FA.png" /></figure><h4><strong>Distributions</strong> :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*RVaLt0BEVl2n9mGn80PscQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*ilNgnrp_GH6XYMn7LJyhvA.png" /></figure><p><em>Remember, these scaling techniques are tools to help make data more understandable and comparable, depending on the specific needs of your analysis.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=876d03834f1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Exploring Sampling Methods: Random vs. Non-Random”]]></title>
            <link>https://medium.com/@bhavanikokkira/exploring-sampling-methods-random-vs-non-random-1b2a573012c2?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b2a573012c2</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Wed, 20 Mar 2024 02:30:13 GMT</pubDate>
            <atom:updated>2024-03-20T02:30:13.985Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/820/0*qTc6mk9w8nqZircA.png" /></figure><p><em>Understanding population and sample concepts is vital in research. Population encompasses the entire group under study, while a sample represents a smaller subset. Sampling methods, including random and non-random approaches, impact data collection and analysis, ensuring unbiased results in research.</em></p><h4>what is population ?</h4><p><em>Population: The whole group you’re interested in studying or understanding. In our example, it’s all the candies in the bag.</em></p><h4>what is Sample ?</h4><p><em>A smaller group selected from the population. It’s like taking a handful of candies from the bag to represent the whole bag.</em></p><h4>Random Sampling and Non-Random Sampling :</h4><p><em>In random sampling, individuals from a population are selected where each member has an equal chance of being chosen, ensuring fairness. Conversely, non-random sampling methods select individuals based on specific criteria, potentially introducing biases into the sample. Both approaches play critical roles in research methodologies, influencing the reliability and representativeness of data.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*-0-lF9sxMqZ94xOC.png" /></figure><h4>Random Sampling Techniques :</h4><blockquote>Random sampling ensures fairness by providing every individual or item in the population with an equal chance of selection.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*HZ4yybP-H9bZ9XnF.png" /></figure><h4>Simple Random Sampling :</h4><blockquote>Simple random sampling means picking people or things from a group in a fair way, where everyone has the same chance of being chosen.Stratified Sampling</blockquote><p><strong><em>Where We apply this simple random sampling : </em></strong><em>Simple random sampling is used when we want to choose something from a big group in a very fair way.</em></p><blockquote><strong>Example : </strong>Imagine you have a bag with different colored candies. If you want to pick some candies to see which colors are most common, you might close your eyes and pick a few candies randomly. This is like simple random sampling because every candy has the same chance of being chosen, just like everyone in a group has an equal chance of being picked.</blockquote><p><strong><em>Advantages : </em></strong><em>Fairness</em></p><p><strong><em>Disadvantages </em></strong><em>: Bias</em></p><h4>Stratified Sampling :</h4><blockquote>In stratified sampling, we first split the big group into smaller groups that are similar in some way. Then, we randomly pick some from each small group in a way that matches how many there are in each group. This helps make sure everyone in the big group is represented fairly, making our findings more reliable.</blockquote><p><strong><em>Where We apply this stratified sampling : </em></strong><em>Stratified sampling ensures fairness by dividing a large group into smaller, similar subgroups based on traits, then selecting proportional samples from each to represent the entire population.</em></p><blockquote><strong>Example :</strong>In a school of 200 students, stratified sampling ensures a fair representation. Dividing by middle and high school, then further by gender, randomly select: 24 middle school boys, 24 middle school girls, 16 high school boys, and 16 high school girls. This method provides balanced insights into students’ opinions on school lunches across different demographics.</blockquote><p><strong><em>Advantage</em></strong><em> : increased precision and lower costs</em></p><p><strong><em>Disadvantage : </em></strong><em>difficulty in selecting appropriate strata and analyzing the results.</em></p><h4><strong>Clustered Sampling :</strong></h4><blockquote>Clustered sampling divides a big group into smaller groups, randomly chooses some of these groups, and includes everyone in those selected groups for the sample.</blockquote><p><strong>Where We apply this Clustered sampling : </strong><em>Clustered sampling is used when studying large areas or populations, such as surveying households in different neighborhoods or testing schools across districts.</em></p><blockquote><strong>Example :</strong>Let&#39;s say we want to know what people buy in different parts of a city. We divide the city into sections like downtown, east, west, north, and south. Then, in each area, we randomly pick a few blocks and ask people there about their shopping habits. This helps us understand what people in different parts of the city like to buy.</blockquote><p><strong><em>Advantage</em></strong><em> : Efficiency, Clustered sampling saves time and resources by organizing populations into manageable clusters for sampling.</em></p><p><strong><em>Disadvantage</em></strong><em> : Clustered sampling may introduce bias if clusters are not representative of the overall population, leading to skewed results.</em></p><p><strong><em>Systematic Sampling : </em></strong><em>Clustered sampling may introduce bias if clusters are not representative of the overall population, leading to skewed results.</em></p><h4>Systematic Sampling</h4><blockquote>Systematic sampling picks every nth person/item from a list, like selecting every 10th student from a list of 1000. It’s easy and spreads the sample evenly across the population. Yet, if there’s any pattern in the list, it may introduce bias.</blockquote><p><strong><em>Where we use systematic sampling : </em></strong><em>Systematic random sampling is used in surveys and studies with a known population list, such as market research or quality control. It’s efficient, selecting every nth item or person, ensuring even coverage. However, if there’s a pattern in the list, it may introduce bias.</em></p><blockquote><strong>Example</strong> : Imagine you have a large group of 500 students, and you want to know their heights. Using systematic random sampling, you could list all the students and then pick every 10th student from the list. This method ensures that every student has an equal chance of being selected and simplifies the data collection process.</blockquote><p><strong>Advantage</strong> : Efficiency, Systematic sampling streamlines data collection by selecting every nth item, saving time.</p><p><strong><em>Disadvantage</em></strong><em> : Bias, Systematic sampling may introduce bias if there’s a pattern in the list, skewing results.</em></p><h4>Non-Random Sampling :</h4><blockquote>Non-random sampling, also known as non-probability sampling, involves selecting individuals or items from a population using methods that do not guarantee equal chances of selection for all members. Instead, individuals are chosen based on specific criteria, convenience, or judgment.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/0*l6EpBVaE17CiGWCE" /></figure><h4>Volunteer Sampling :</h4><blockquote>Volunteer sampling is when people choose to be part of a study. It’s easy to do but can lead to biased results because only certain types of people may volunteer, not representing everyone. This method might overlook opinions or experiences from those who don’t volunteer.</blockquote><p><strong><em>Where we use volunteer sampling </em></strong><em>: Volunteer sampling is often used in situations where researchers rely on readily available participants, such as online surveys or community events.</em></p><blockquote><strong>Example</strong> : Conducting a survey about smartphone usage and posting it on social media, where individuals voluntarily choose to participate by filling out the survey.</blockquote><p><strong>Advantage : </strong><em>Accessibility ,Volunteer sampling is accessible as participants readily volunteer to participate.</em></p><p><strong>Diadvantage</strong> : <em>Bias,Volunteer sampling may introduce bias as volunteers may not represent the entire population, leading to skewed results.</em></p><h4>Convenience Sampling :</h4><blockquote><em>Convenience sampling selects participants based on their easy accessibility or proximity to the researcher. Although quick and cost-effective, it may not accurately represent the entire population due to the potential for selection bias.</em></blockquote><p><strong><em>Where we use Convenience Sampling : </em></strong><em>Convenience sampling is often used in situations where researchers need data quickly and easily, such as classroom surveys or informal polls. It’s like picking low-hanging fruit for research — quick and accessible.</em></p><blockquote><strong>Example</strong> : Lets say, conducting interviews with individuals passing by on the street about their opinions on a local issue. It’s convenient because you can easily approach people nearby, but it may not represent the broader population’s views.</blockquote><p><strong><em>Advantage</em></strong><em> : Speed Explanation,Convenience sampling allows for quick data collection due to its ease of implementation.</em></p><p><strong><em>Disadvantage </em></strong><em>: Bias ,Convenience sampling may introduce bias as participants are chosen based on accessibility, potentially leading to skewed results.</em></p><h4>Quota Sampling :</h4><blockquote>Quota sampling matches predetermined quotas for characteristics like age or gender, ensuring representation of specific groups. However, it may overlook other groups, leading to incomplete or biased samples<em>.</em></blockquote><p><strong><em>Where we use Quota Sampling : </em></strong><em>Quota sampling is used in situations where researchers need to ensure representation of specific demographic groups, such as in market research or political polling. They set quotas for characteristics like age, gender, or occupation to reflect the population accurately.</em></p><blockquote><strong>Example<em> </em></strong><em>: </em>Imagine you’re making a survey about favorite colors in a class of 30 students. You decide to select 15 boys and 15 girls to ensure equal representation of genders, making sure your sample matches the class’s gender makeup.</blockquote><h4>Snowball Sampling :</h4><blockquote>Snowball sampling starts with a small group of participants who are then asked to refer others who meet the study criteria, creating a “snowball” effect. It’s useful for studying hard-to-reach populations, but it may introduce bias as participants’ networks may share similar characteristics, limiting the sample’s diversity.</blockquote><p><strong><em>Where we use Snowball Sampling : </em></strong><em>Snowball sampling is used when researchers need to study hidden or difficult-to-reach populations, like homeless individuals or illegal drug users. It starts with a few participants who then refer others, helping researchers access individuals who might not otherwise volunteer for the study.</em></p><blockquote><strong>Example : </strong>Snowball sampling is like making new friends through your friends. You start with a small group, and they bring along more friends, like a snowball getting bigger as it rolls down a hill. It’s helpful for studying groups that are hard to find, but be careful because your friends might all be similar, so you might miss some different kinds of people.</blockquote><p><strong><em>Advantage</em></strong><em> : Accessibility ,Snowball sampling provides access to hidden populations, aiding in research on hard-to-reach groups.</em></p><p><strong><em>Disadvantage </em></strong><em>: Bias ,Snowball sampling may introduce bias as participants’ networks may share similar characteristics, limiting sample diversity.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b2a573012c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diving into the Intriguing World of Statistical Probability]]></title>
            <link>https://medium.com/@bhavanikokkira/diving-into-the-intriguing-world-of-statistical-probability-4b713b91f19e?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b713b91f19e</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Wed, 13 Mar 2024 02:19:56 GMT</pubDate>
            <atom:updated>2024-03-14T04:19:36.937Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*ne5Ppll9I3dkbQTRbbp3WQ.png" /></figure><h4>Probability</h4><p><em>Probability is the measure of the likelihood that an event will occur. It is quantified as a number between 0 and 1.</em></p><ul><li><em>The values of probability range from 0 to 1, with 0 telling us improbability and 1 denoting certainty.</em></li><li><em>For calculating probability, we simply divide the number of favorable outcomes by the total number of outcomes.</em></li></ul><h4>Where we use probability</h4><ul><li><em>Probability is widely used in all sectors in daily life like sports, weather reports, blood samples, predicting the sex of the baby in the womb, congenital disabilities, statics, and many. In this topic, we will learn in detail about probability.</em></li></ul><h4>Terms in Probability</h4><p><em>Here are some basic concepts or terminologies used in probability :</em></p><p><strong><em>Experiment</em></strong> : <em>A process or trial with uncertain results.</em></p><ul><li><em>Example : include coin tossing , card selection, or rolling a die.</em></li></ul><p><strong><em>Event</em></strong> : <em>A subset of the sample space representing certain outcomes.</em></p><ul><li><em>Example : getting “1” when rolling a die.</em></li></ul><p><strong><em>Sample</em></strong><em> </em><strong><em>space</em></strong><em> : The set of all possible outcomes in a probability experiment.</em></p><ul><li><em>For instance , in a coin toss, it’s “head” and “tail”.</em></li></ul><p><strong><em>Sample</em></strong><em> </em><strong><em>Point</em></strong><em> : One of the possible results in an experiment.</em></p><ul><li><em>For example, in rolling a fair six-sided dice, sample points are 1 to 6.</em></li></ul><p><strong><em>Favorable Outcome : </em></strong><em>An outcome that produces the desired or expected consequence.</em></p><h4>Theoretical Probability</h4><p><em>Theoretical probability,</em> also known as classical or a priority probability, it <em>is a way to figure out the chance of something happening based on the assumption that all outcomes are equally likely.</em></p><p><strong>The formula for theoretical probability (P) is :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*CwpMfJJ4tnx2HHhC" /></figure><p><strong><em>Example : </em></strong><em>If you roll a fair six-sided die, the theoretical probability of getting a 3 is 1 out of 6 because there’s only one 3 on the die, and there are six possible outcomes (1 through 6).</em></p><h4>Empirical probability (or ) experimental probability</h4><p><em>Empirical probability, is a way to determine the likelihood of an event based on actual observations or experiments. Unlike theoretical probability, which relies on the assumption of equally likely outcomes, empirical probability is calculated by conducting experiments or collecting data from real-world situations.</em></p><p><strong>The formula for Expherical probability is :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*iKyWIhSP8bkX-y4w1UVyqw.png" /></figure><p><strong><em>Example : </em></strong><em>If you actually roll the die 50 times and get a 3, say, 8 times, then the empirical probability of getting a 3 is 8/50​.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/0*0s0Rgpll556gkEL7.png" /></figure><h4>Law of Large Numbers</h4><p>The Law of Large Numbers is a statistical principle that describes the tendency of sample means to approach the population mean as the sample size increases. In simpler terms, it suggests that as you conduct more trials or gather more data, the average or observed outcomes should get closer to the expected or theoretical outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ewGSFVCvDQ1U4Mgx.jpg" /></figure><h4>Random Variable</h4><p><em>Random Variable is a function which takes Every occurrence in a sample space and assigns real value.</em></p><ul><li><strong><em>In statistics ,</em></strong><em> random variables can be classified into two main types : </em><strong><em>discrete and continuous.</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/0*jaNpON-ZT3EVKlg3.jpg" /></figure><p><strong><em>Discrete Random Variable </em>: </strong><em>Takes on a countable number of distinct values.</em></p><ul><li><em>Examples include the number of heads in multiple coin tosses or the count of students in a classroom.</em></li></ul><p><strong><em>Continuous Random Variable : </em></strong><em>Can take any value within a given range. Often associated with measurements and can have an infinite number of possible outcomes.</em></p><ul><li><em>Examples include the height of individuals, the time it takes for an event to occur, or the temperature at a specific location.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/0*NFo2tCxjV9psgGtf.png" /></figure><h4>Axioms of Probability</h4><p><strong><em>Non-negativity Axiom : </em></strong><em>Probability values are always non-negative.</em></p><ul><li><em>P</em>(<em>A</em>)≥0 for any event <em>A</em>.</li></ul><p><strong><em>Normalization (Unit Measure) Axiom </em></strong>:<em> The sum of probabilities over all possible outcomes in the sample space is equal to 1.</em></p><ul><li><em>P</em>(<em>S</em>)=1, where <em>S</em> is the sample space.</li></ul><p><strong><em>Additivity Axiom for Joint Probability </em></strong>: <em>For any two events A and B, the joint probability of their occurrence is the sum of their individual probabilities minus the probability of their intersection.</em></p><ul><li><em>P</em>(<em>A</em>∪<em>B</em>)=<em>P</em>(<em>A</em>)+<em>P</em>(<em>B</em>)−<em>P</em>(<em>A</em>∩<em>B</em>).</li></ul><p><strong><em>Conditional Probability Axiom</em></strong> : <em>The conditional probability of an event A given another event B is the joint probability of A and B divided by the probability of B.</em></p><ul><li><em>P</em>(<em>A</em>∣<em>B</em>)=<em>P</em>(<em>B</em>)<em>P</em>(<em>A</em>∩<em>B</em>)​.</li></ul><p><strong><em>Probability of the Complement </em></strong>: <em>The probability of the complement of an event A (denoted as ′A′ or ˉAˉ) is equal to one minus the probability of A.</em></p><ul><li><em>P</em>(<em>A</em>′)=1−<em>P</em>(<em>A</em>).</li></ul><h4>Types Of Probabilities</h4><p><strong><em>Independent Events </em></strong><em>: Two events, A and B, are independent if the occurrence (or non-occurrence) of one does not affect the occurrence of the other.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*eGmsxrrTYcCWR7ZIZDPo9A.png" /></figure><p><strong><em>Example : </em></strong><em>Two events, like flipping a coin and rolling a die, are independent if one event doesn’t affect the other. For example, getting heads on a coin toss doesn’t change the chances of rolling a 3 on a die.</em></p><ul><li><strong><em>In Simple Terms</em></strong><em> : P(A∩B)=P(A)⋅P(B) , They don’t influence each other.</em></li></ul><p><strong><em>Dependent Events :</em></strong><em> Two events, A and B, are dependent if the occurrence (or non-occurrence) of one event affects the occurrence of the other.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*NdZPXys7nzPHg7St.png" /></figure><p><strong><em>Example : </em></strong><em>Two events are dependent if the outcome of one event affects the outcome of the other. If you draw a card from a deck and don’t put it back, the chances for the second draw are influenced by the first.</em></p><ul><li><strong><em>In Simple Terms </em></strong><em>: P(A∩B)=P(A)⋅P(B) ,One event depends on the other.</em></li></ul><p><strong><em>Mutually Exclusive Events : </em></strong><em>Two events, A and B, are mutually exclusive (or disjoint) if they cannot occur simultaneously.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*7ctqDJniHGBVgjeINNyHVA.png" /></figure><p><strong><em>Example</em></strong><em> :Events are mutually exclusive if they can’t happen at the same time. Like getting both heads and tails on a single coin toss.</em></p><ul><li><strong><em>In Simple Terms</em></strong><em> : P(A∩B)=0,They can’t occur together.</em></li></ul><p><strong><em>Conditional Probability :</em></strong><em> The probability of an event A occurring given that another event B has already occurred.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_GnWFnHMVBhznkab.jpg" /></figure><p><strong><em>Explanation</em></strong><em> : Conditional probability is like asking, “What’s the chance of something happening, given that we know something else has already happened?”</em></p><ul><li><strong><em>In Simple Terms </em></strong><em>: P(A∣B)=P(B)P(A∩B)​, Probability with a condition or situation.</em></li></ul><p><strong><em>Joint Probability </em></strong><em>: The probability of the occurrence of two (or more) events simultaneously.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/0*xopneSL8AGYl-7GZ.png" /></figure><ul><li><strong><em>Explanation</em></strong><em> : Joint probability is when we want to know the chance of two things happening together, like rolling a 4 on a die and getting heads in a coin toss.</em></li><li><strong><em>In Simple Terms </em></strong><em>: P(A∩B),Probability of both things happening at once.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b713b91f19e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Missing Values in Pandas]]></title>
            <link>https://medium.com/@bhavanikokkira/missing-values-in-pandas-a316f089713e?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/a316f089713e</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 13:42:41 GMT</pubDate>
            <atom:updated>2024-01-11T14:35:41.459Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>“<em>Ever found yourself puzzled by those mysterious gaps in your data? Join me on a journey through my latest blog, where I demystify the challenges of dealing with missing values. let’s embark on an adventure together. Discover smart strategies, avoid common pitfalls, and gain fascinating insights into the world of handling missing data. Don’t let those empty spots in your dataset hold you back.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6y-QxImEM2W1jMis.png" /></figure><p><em>In Pandas, missing values are represented by the NaN (Not a Number) value. Missing values can occur in a DataFrame or Series when data is not available or is incomplete. It’s essential to handle missing values properly because they can affect the accuracy and reliability of your data analysis.</em></p><p><em>MCAR, MAR, and MNAR are terms used to describe the mechanisms by which data can be missing in a dataset. These terms are particularly relevant in the context of handling missing data in statistical analysis. Let’s break down each term:</em></p><h3>Types Of Missingness</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*WCgVCkkK8otM2zSC.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/0*3fuIQm-PzRcQ6un5" /></figure><h3>MCAR ( Missing completely at random ) :</h3><ul><li><em>MCAR means that the missing values in your data are entirely random and have no connection to the observed or unobserved data. It’s like the missing values are scattered randomly across your dataset, and there’s no specific pattern to their occurrence.</em></li><li><em>In Pandas, you might observe MCAR if, for example, some students forget to fill in certain questions on a survey, and these missing answers are spread across all the questions randomly.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*piXHpUW7NXJIOXxU3_ssoQ.png" /><figcaption>white lines are missing values ,MCAR</figcaption></figure><h3>MAR ( Missing at random ) :</h3><ul><li><em>MAR means that the likelihood of a value being missing is related to the observed data but not to the unobserved data. In simpler terms, whether a value is missing depends on the values of other variables in your dataset, but not on the missing variable itself.</em></li><li><em>For instance, in Pandas, you might have MAR if students from certain classes are more likely to skip answering certain questions on a test, but this behavior is related to their class and not the actual content of the unanswered questions.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*YkHf-qiHyR5fEfajVlsXHg.png" /><figcaption>In the last column white lines are represented as nan values ,MAR</figcaption></figure><h3>MNAR ( Missing not at random ) :</h3><ul><li><em>MNAR means that the probability of a value being missing is related to the unobserved data itself. In other words, the fact that a value is missing is directly connected to the missing variable.</em></li><li><em>In Pandas, this could happen if, for example, students who scored low in a test are more likely to skip answering certain questions, creating a link between the missing values and the unobserved (test scores) data.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*dQg8JTCCXP_wEmcrxGyqxw.png" /><figcaption>In weight column the last part is missing values ,MNAR</figcaption></figure><h4>How can we find missing values :</h4><ul><li><strong><em>isna() and isnull()</em></strong><em> : These functions return a DataFrame of the same shape as the original, where each element is a Boolean value indicating whether it’s missing (True) or not (False).DataFrame.isnull is an alias for DataFrame.isna.</em></li><li><strong><em>notna() and notnull()</em></strong><em> : These functions return the opposite of isna() and isnull() , indicating non-missing values.DataFrame.notnull is an alias for DataFrame.notna.</em></li><li><strong><em>info</em></strong><em>: This method provides a concise summary of the DataFrame, including the count of non-null values for each column. By comparing this count to the total number of rows, you can quickly identify columns with missing values.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*O2Wp8odH4dydz2fggC-c4g.png" /></figure><h4><strong>Handling Missing Values :</strong></h4><h4>dropna ( ) : Removes rows or columns containing missing values.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Ns6vFWDyRdWnC5VVmtQOAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TFXSIpUZtS8RzEF0.png" /></figure><h4>Parameter Of dropna ( ) :</h4><p><strong><em>| DataFrame.dropna(*, axis=0, how=_NoDefault.no_default, thresh=_NoDefault.no_default, subset=None, inplace=False, ignore_index=False)</em></strong><a href="https://github.com/pandas-dev/pandas/blob/v2.1.4/pandas/core/frame.py#L6286-L6444"><strong><em>[source]</em></strong></a></p><h4>i. axis :</h4><p><em>This parameter determines whether you want to drop missing values along rows (axis=0) or columns (axis=1).by deault it takes (axis=0)</em></p><ul><li><em>If axis=0, it will drop rows containing missing values.</em></li><li><em>If axis=1, it will drop columns containing missing values.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*eFqMmBUvXmzunRJ9pJNHYg.png" /></figure><h4>ii. Thresh :</h4><p><em>This parameter allows you to specify a threshold for the number of non-missing values. Rows or columns with fewer non-missing values than the threshold will be dropped.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*S1zrrOVSegtiKN2Szyh4IQ.png" /></figure><h4>iii. how :</h4><ul><li><em>This parameter allows you to specify the condition for dropping. The options are:</em></li><li><em>‘any’: Drop if any missing value is present in the row or column (default behavior).</em></li><li><em>‘all’: Drop only if all values are missing in the row or column.</em></li></ul><h4>iv. subset :</h4><ul><li><em>You can use the subset parameter to specify a subset of columns or rows where missing values should be considered. It takes a list of column names or row indices.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*32SK8b1QSTf2hsOMujSe3A.png" /></figure><h4><strong><em>Imputation</em></strong><em> fills in the missing values with some number. For instance, we can fill in the mean value along each column .</em></h4><h4>Imputation :</h4><p><em>Imputation involves replacing missing values with estimated values based on the available data. This can be done using statistical measures like mean, median, or mode.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*8kUHHo5AHHzrlMJ0SmR2YA.png" /></figure><h4>Interpolation :</h4><p><em>Interpolation is a method for estimating missing values based on the values of adjacent data points.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Lcx3n8gLQIAeM6vJRW6nzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*EhARmGrfw3j9qX_vzULL2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Cw8Dg-0ypOE59VXa.png" /></figure><h4>Parameter of fillna ( )</h4><h4>i. axis :</h4><p><em>The axis parameter allows you to specify whether to fill missing values along rows (axis=0) or columns (axis=1).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*8MmiYSuQNOXEBpcxv5-rOg.png" /></figure><h4>ii. inplace :</h4><p><em>The inplace parameter, if set to True, modifies the DataFrame or Series in place and returns None. If set to False (default), it returns a new DataFrame or Series with missing values filled.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*2GCNWlE9Tl3WGl_SqSQ0kA.png" /></figure><h4>iii. value :</h4><p><em>The value parameter allows you to specify the value that will be used to fill the missing entries. This could be a scalar value, a dictionary (to specify different values for different columns), or a Series.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*CVM1LyT4njBN-byj0XX48Q.png" /></figure><h4>iv. method:</h4><p><em>The method parameter allows you to specify a method for filling missing values. Some common methods are:</em></p><ul><li><em>‘</em><strong><em>f fill’</em></strong><em> or</em><strong><em> ‘pad’</em></strong><em>: Forward fill — fills missing values with the previous non-missing value.</em></li><li><strong><em>‘b fill’</em></strong><em> or </em><strong><em>‘backfill’</em></strong><em>: Backward fill — fills missing values with the next non-missing value.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*rubAwA8R7bHV7EOrEqDvwQ.png" /></figure><h4>Replace :</h4><p>This method is almost similar to fillna().But it has some extra functionalities</p><p><strong><em>Syntax:</em></strong><em> DataFrame.replace(to_replace=None, value=None, inplace=False, limit=None, regex=False, method=’pad’, axis=None)</em></p><h4><strong><em>Parameters of replace :</em></strong></h4><ul><li><strong><em>to_replace : </em></strong><em>[str, regex, list, dict, Series, numeric, or None] pattern that we are trying to replace in dataframe.</em></li><li><strong><em>value :</em></strong><em> Value to use to fill holes (e.g. 0), alternately a dict of values specifying which value to use for each column (columns not in the dict will not be filled). Regular expressions, strings and lists or dicts of such objects are also allowed.</em></li><li><strong><em>inplace :</em></strong><em> If True, in place. Note: this will modify any other views on this object (e.g. a column from a DataFrame). Returns the caller if this is True.</em></li><li><strong><em>limit : </em></strong><em>Maximum size gap to forward or backward fill</em></li><li><strong><em>regex :</em></strong><em> Whether to interpret to_replace and/or value as regular expressions. If this is True then to_replace must be a string. Otherwise, to_replace must be None because this parameter will be interpreted as a regular expression or a list, dict, or array of regular expressions.</em></li><li><strong><em>method : </em></strong><em>Method to use when for replacement, when to_replace is a list.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fGtBOomn5mOvyvIQVxkAOA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a316f089713e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decorators :]]></title>
            <link>https://medium.com/@bhavanikokkira/decorators-65810054ab06?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/65810054ab06</guid>
            <category><![CDATA[decorators-in-python]]></category>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Wed, 22 Nov 2023 18:09:53 GMT</pubDate>
            <atom:updated>2023-11-22T18:21:33.932Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Decorators</strong> :</h3><p><em>Decorator is a nothing but adding functionalities to the already existing function.</em></p><p><em>decorators are a powerful and flexible way to modify or extend the behavior of functions or methods without changing their code. Decorators allow you to wrap another function or method with additional functionality. They are often used to perform tasks such as logging, timing, access control, and more.</em></p><p><strong>Programming using decorator :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4q8-_Qkhi9tE22DfXHhWA.png" /></figure><p><strong>programming with parameters using Decorator</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6Q4-Pgzt_9mscwImgUJ_g.png" /></figure><p><strong>Wraps :</strong></p><p><em>The</em><strong><em> </em></strong><strong><em>@wraps</em></strong><em> decorator in Python is a decorator provided in the </em><strong><em>functools</em></strong><em> module. It is used to update a wrapper function to look more like the wrapped function. When you use a decorator without </em><strong><em>@wraps,</em></strong><em> the wrapper function will have a different name, docstring, and other attributes compared to the original function. The </em><strong><em>@wraps</em></strong><em> decorator helps in preserving the metadata of the original function, making it more transparent and maintaining information such as the function name and docstring.</em></p><p><strong>Chaing Decorator :</strong></p><p>chaining decorators, is involving ,to applying multiple decorators to a single function.</p><p><strong>Programming using Chaining Decorator :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjcmSo-zZAB7QGbGNBEjzg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65810054ab06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functions]]></title>
            <link>https://medium.com/@bhavanikokkira/functions-f1e2d130f178?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1e2d130f178</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 16:55:29 GMT</pubDate>
            <atom:updated>2023-11-07T17:09:14.799Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A function is a reusable block of code that performs a specific task or set of tasks. Functions are a fundamental concept in programming and are used to encapsulate and organize code for better modularity, readability, and reusability.</em></p><p><strong><em>Syntax : </em></strong><em>def function_name(parameters):</em></p><p><strong><em>def</em></strong><em>: This keyword is used to define a function in Python.</em></p><p><strong><em>function_name</em></strong><em>: Choose a name for your function that follows Python&#39;s naming conventions. Function names should be descriptive and follow lowercase_with_underscores (snake_case) naming style.</em></p><p><strong><em>parameters:</em></strong><em> These are placeholders for values that you can pass into the function as input. Parameters are enclosed in parentheses and separated by commas.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*xJnWgfQdPc8DbMldejh4JA.png" /></figure><p><em>A small program for calling a function</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*gpX-IfRlamLyiNo5WrjK-A.png" /></figure><h4><strong>Arguments :</strong></h4><ul><li><em>An argument is a value that is passed to a function when it is called. It might be a variable, value or object passed to a function or method as input. They are written when we are calling the function.</em></li><li><em>In python,function supports 3 types of arguments :<br>1. Positional argument. <br>2. Keyword argument.<br>3. Default argument.</em></li></ul><h4>Positional Arguments:</h4><ul><li><em>positional arguments are a type of argument passed to a function or method in a specific order based on their position or order in the function’s parameter list.</em></li><li><em>When you define a function, you specify its parameters in a particular order, and when you call the function, you provide arguments that correspond to those parameters in the same order. Python uses this positional information to match the arguments with the parameters.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*FC9sn-UY4drk9BU5p1Xj9w.png" /></figure><p><strong><em>Example of positional</em> argument </strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCihYzAvSH0XpidfNK_p_w.png" /></figure><h4>Keyword Arguments :</h4><ul><li><em>keyword arguments (also known as keyword parameters) are a way to pass arguments to a function by specifying the parameter names along with their values when calling the function.</em></li><li><em>keyword arguments allow you to specify the parameter names explicitly. This can make your code more readable and flexible, as it’s not dependent on the order of the parameters.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*JgJA0pMv88NliWnfkh8AIA.png" /></figure><p><strong><em>Example of keyword arguments :</em></strong></p><h4>Default Arguments :</h4><ul><li><em>Default arguments are parameters of a function that have a predefined default value. When you define a function and specify default values .</em></li><li><em>For certain parameters, it means that those parameters can be omitted when calling the function, and Python will use the default values instead.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*e7AIYg59Ar4NU97r5-pqBQ.png" /></figure><p><strong>Example For Default Argument</strong><em> :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*HBu1Q4KlrXj6TpVJseYDGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*9z-E0TybvRToO2Zd0-68-w.png" /></figure><h4>Document String :</h4><ul><li><em>A “docstring” (short for “documentation string”) is a special type of string literal that is used to document a module, class, function, or method.</em></li><li><em>Docstrings are intended to provide information about the purpose, usage, and behavior of the code they document. They serve as documentation for the code and are used to help other developers (including your future self) understand how to use and work with your code.</em></li><li><em>A docstring is typically placed as the first statement in a module, class, function, or method and is enclosed in triple quotes (either single or double quotes).</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ebsPm--4UFGk0GjgyUx-A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1e2d130f178" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Classes in Python Programming Language:]]></title>
            <link>https://medium.com/@bhavanikokkira/classes-in-python-programming-language-690618e1d39f?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/690618e1d39f</guid>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 11:07:44 GMT</pubDate>
            <atom:updated>2023-10-18T11:07:44.050Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Class :</strong></h3><p><em>In Python, a class is a blueprint or a template for creating objects (instances). Objects are instances of a class, and classes define the attributes (data) and methods (functions) that those objects will have. Here’s a basic overview of how to define and use classes in Python:</em></p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*8Dzzk0VBjTU7w-MrpQloSQ.png" /></figure><h4>String Methods:</h4><ul><li>Strings are <strong>Immutable</strong>, the resulting strings from string methods have a <strong>new memory location</strong></li><li>in order to use these strings, we need re-assign it to a var</li></ul><h4>Upper ( ):</h4><p><em>It will converted into </em><strong><em>capital letters</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*-XfBOMjPmtuNmJxBJbWXLA.png" /></figure><p><em>An Example for Strings are immutable :</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*jdCWqnJz4-1X-dXFGGzMuw.png" /></figure><h4>Lower ( ):</h4><ul><li>It will converted into <strong>Small letters.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*xPjQ6wCcJTBncW7xJwsOOA.png" /></figure><h4><strong>Capitalize( )</strong></h4><ul><li>Starting alphabet is converted into capital case.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*RDxzrs2vk0BDzq50qNXUjg.png" /></figure><h4><strong>Title ( )</strong></h4><ul><li><strong>First alphabet</strong> in every word converted into <strong>capital case</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*MoNOqa-WUpxRE9SHB6TWvw.png" /></figure><h4><strong>Swap case ( )</strong></h4><ul><li><em>Swapping the case of characters in a string means converting </em><strong><em>lowercase characters to uppercase </em></strong><em>and </em><strong><em>uppercase characters to lowercase</em></strong><em> while leaving non-alphabet characters unchanged. Here’s a Python function that accomplishes this</em></li></ul><p>original _string = “Hello, World!”<br>swapped _string = swap _case(original _string)<br>print(swapped _string) # Output: hELLO , wORLD!</p><h4><strong>Case Fold ( )</strong></h4><p><em>This means the casefold() method converts more characters into lower case compared to lower() . For example, the German letter ß is already lowercase so, the lower() method doesn’t make the conversion. But the </em><strong><em>casefold () </em></strong><em>method will convert </em><strong><em>ß</em></strong><em> to its equivalent character</em><strong><em> ss</em></strong><em> .</em></p><h4><em>Example:</em></h4><p><em>‘the </em>ß character called eszett<em>’</em></p><p>out put: ‘the ss character called eszett’</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=690618e1d39f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strings]]></title>
            <link>https://medium.com/@bhavanikokkira/strings-db831f50f084?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/db831f50f084</guid>
            <category><![CDATA[indexing]]></category>
            <category><![CDATA[slicing]]></category>
            <category><![CDATA[string]]></category>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Tue, 17 Oct 2023 11:00:32 GMT</pubDate>
            <atom:updated>2023-10-17T11:00:32.876Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Strings are characters or a sequence of characters, enclosed in quotes(‘single quote’, “double quotes” or “‘triple quotes”’)</em></p><p><em>“‘Triple quotes’” are used as multiline strings, multiline comments and as doc strings</em></p><p><strong><em>Creating a sample string</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*zVAyRQHOAISNl0PJRJL6gQ.png" /></figure><p><strong><em>Escape Characters</em></strong> :</p><p><em>→ An escape sequence contains a backslash (\) symbol followed by one of the escape sequence characters or an octal or hexadecimal number. A hexadecimal escape sequence contains an x followed by one or more hexadecimal digits (0–9, A-F, a-f). An octal escape sequence uses up to three octal digits (0–7).</em></p><ul><li><em>\n — -&gt;Is moving to the next line</em></li><li><em>\t — -&gt; Tab space</em></li><li><em>\r — -&gt;It moves the cursur to start of the line</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*bZ5Jy5sH6PadR7-Ps9nQXA.png" /></figure><p><strong><em>Raw String and format string :</em></strong></p><p><strong><em>Raw string :</em></strong></p><p><em>A raw string, also known as a raw literal or raw text literal, is a way to represent strings in programming languages, where escape sequences are not processed or interpreted. In many programming languages, escape sequences are used to represent special characters, such as newline characters (</em><em>\n) or tabs (</em><em>\t), within a string. However, in a raw string, these escape sequences are treated as literal characters, and their backslashes are not used for escaping.</em></p><p><em>The exact syntax for creating raw strings may vary from one programming language to another, but in many languages, an “r” (or some other character) is placed in front of the string literal to indicate that it should be treated as a raw string. For example, in Python, you can create a raw string like this:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*h8z1AGqgjVS_wgoU4zIqIw.png" /></figure><p><em>In the above Python example, the string </em><strong><em>raw _string</em></strong><em> is a raw string, and the backslash before the &quot;n&quot; is treated as a literal backslash, and not as an escape sequence for a newline character.</em></p><p><em>Raw strings are often used when dealing with regular expressions, file paths, or any other context where backslashes or escape sequences could be problematic. They help avoid unintended escaping and make it easier to work with literal representations of text.</em></p><p><strong><em>Indexing :</em></strong></p><p><em>In Python, indexing is the process of accessing individual elements of a data structure, such as a list, tuple, string, or other sequence-like objects. Indexing allows you to retrieve specific items from the collection by specifying their position within the sequence. Python uses zero-based indexing, which means the first element is at index 0, the second element is at index 1, and so on.</em></p><p><em>Here’s how indexing works for various data structures:</em></p><ul><li><strong><em>Indexing in Strings</em></strong><em>:</em></li></ul><p><em>Strings are sequences of characters, and you can access individual characters by their index.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*iLj8Ssh3nQiBJuhAaB6N4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*QnB-NZRt25c1tlOI5fir_w.png" /></figure><ul><li><strong><em>Negative Indexing:</em></strong></li></ul><p><em>You can also use negative indices to access elements from the end of a sequence. </em><em>-1 refers to the last element, </em><em>-2 refers to the second-to-last element, and so on.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*a6DdyR8pQjDrd4iWJW25WA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*H5QD0JG-Pv1sMuiaFeRrUw.png" /></figure><ul><li><strong><em>Slicing</em></strong></li><li><em>Slicing is a more versatile way to extract a portion of a sequence. You specify a range of indices to create a new sequence containing elements from the original.</em></li><li>To slicing we need 3 values [Starting index : ending index : step size]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*XDJomModta2_ZXZLTFjGAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*-FGDwjfAi1tfOwAQcl6uRw.png" /></figure><p><em>Keep in mind that attempting to access an index that doesn’t exist will result in an “Index Error.” It’s important to ensure that the index you use is within the valid range for the data structure.</em></p><p><strong><em>Concatenation :</em></strong></p><ul><li><em>Concatenation in Python refers to the process of combining two or more strings, lists, or other sequences to create a new sequence. The </em><em>+ operator is commonly used for concatenating strings, while the</em> <em>extend() method or the </em><em>+ operator can be used for concatenating lists.</em></li></ul><p><em>— → Here are examples of concatenation in Python:</em></p><ul><li><strong><em>Concatenating Strings:</em></strong></li><li><em>You can use the </em><em>+ operator to concatenate two or more strings together:</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*RWPeRsA1gwi22fWxxBmatQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*wESSf3UIHVbBJOhTsHj18w.png" /></figure><p><em>In Python, different data types have different rules for concatenation, so make sure to handle data type conversions as needed.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db831f50f084" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Types]]></title>
            <link>https://medium.com/@bhavanikokkira/data-types-0fe04322ecee?source=rss-514a8d216331------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fe04322ecee</guid>
            <category><![CDATA[data-types-in-python]]></category>
            <dc:creator><![CDATA[Naga Durga Bhavani. Kokkira]]></dc:creator>
            <pubDate>Wed, 11 Oct 2023 10:31:48 GMT</pubDate>
            <atom:updated>2023-10-11T10:31:48.116Z</atom:updated>
            <content:encoded><![CDATA[<p>Data types are the classification or categorization of knowledge items. The 6 standard data types in Python are Numeric, String, List, Tuple, Set, and Dictionary.</p><p><strong>Numerical Data Types :</strong></p><p>The numeric data type in Python represents the data that has a numeric value. A numeric value can be an integer, a floating number, or even a complex number. These values are defined as Python int, Python float, and Python complex classes in Python.</p><p><strong>Integers : </strong>This value is represented by int class. It contains positive or negative whole numbers (without fractions or decimals). In Python, there is no limit to how long an integer value can be.</p><p><strong>Float Values :</strong> This value is Represented by float(value). When called, float() returns a floating point number or a decimal point for a provided number or string.</p><p><strong>Complex : </strong>The Complex Data Type in Python is the data type that is used for representing complex numbers. As mentioned above a complex number is represented in the form of “a + bi’. In Python, we use the j or J suffix instead of i, for denoting the imaginary part of the complex number. For example, 3 + 3j</p><p><strong>String Data Types : </strong>In Python, a string is a sequence of characters enclosed within either single quotes (‘ ‘) or double quotes (“ “) or triple quotes (‘“ “‘). It is an immutable data type, which means once a string is created, it cannot be modified. However, it is possible to create a new string by concatenating two or more strings.</p><p><strong>List : </strong>A list is a data structure in Python that is a mutable, or changeable, ordered sequence of elements. Each element or value that is inside of a list is called an item. Just as strings are defined as characters between quotes, lists are defined by having values between square brackets [ ] .</p><p><strong>Tuple : </strong>Tuples are used to store multiple items in a single variable. Tuple is a collection which is ordered and unchangeable or immutable. Tuples are defined by having values between parenthesis ( ).</p><p><strong>Sets : </strong>Sets are used to store multiple items in a single variable. A set is a collection which is unordered, unchangeable, and unindexed. Sets are defined by having values between curly brackets { }.</p><p><strong>Dictionary : </strong>Dictionaries are used to store data values in key : value pairs. A dictionary is a collection which is ordered, changeable and do not allow duplicates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/0*zI9kH5FoGFz4P9T7.jpg" /></figure><p><strong>Sequence : </strong>Arranging in a ordered manner is called a sequence.<strong> </strong>Sequences allow you to store multiple values in an organized and efficient fashion. Here Strings, list and tuple are comes under sequence data type.</p><p><strong>Mutable : </strong>If an object can be modified after it is created is called as a mutable. This means that you can alter its internal data or attributes without creating a new object. Examples of mutable objects in Python include lists, dictionaries, and sets.</p><p><strong>Immutable : </strong>Immutable in Python is when you cannot change the object type over time. If it is not possible to alter the value of an object in Python, it is known as an immutable object. Once an immutable object is created, its value remains permanent and unchangeable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fe04322ecee" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>