<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Roy Shavi Kinyua</title>
    <description>The latest articles on DEV Community by Roy Shavi Kinyua (@roy_b5001e0ff9a27dea39641).</description>
    <link>https://dev.to/roy_b5001e0ff9a27dea39641</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3519620%2F078c5835-b754-45e3-8f8d-da7fc7329d78.png</url>
      <title>DEV Community: Roy Shavi Kinyua</title>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roy_b5001e0ff9a27dea39641"/>
    <language>en</language>
    <item>
      <title>Explain the difference between subquery,CTE and stored procedures</title>
      <dc:creator>Roy Shavi Kinyua</dc:creator>
      <pubDate>Thu, 06 Nov 2025 21:50:06 +0000</pubDate>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641/explain-the-difference-between-subquerycte-and-stored-procedures-54cf</link>
      <guid>https://dev.to/roy_b5001e0ff9a27dea39641/explain-the-difference-between-subquerycte-and-stored-procedures-54cf</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Stored Procedure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A stored procedure is a precompiled collection of SQL statements (and sometimes control logic) stored in the database. It’s like a function that can be called whenever needed. It can accept parameters such as input and output, and is also often used for complex logic, such as loops.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wyd9942rpxzrwhosz5k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wyd9942rpxzrwhosz5k.JPG" alt=" " width="644" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;CTE (Common Table Expression)
A CTE is a temporary named result set you can use within a single query. Think of it as a short-term, readable alias for a subquery. It exists only during query execution. CTE's make complex queries easier to read and maintain.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkg77hkg9jdbc751f22i3.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkg77hkg9jdbc751f22i3.JPG" alt=" " width="640" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Subquery
A subquery is a query nested inside another query; in other words, it is like a query within a query. It can appear within the SELECT, FROM, or WHERE clause, and it executes each time the main query is run.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjimps1x95onye5z63dfo.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjimps1x95onye5z63dfo.JPG" alt=" " width="368" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>database</category>
      <category>sql</category>
    </item>
    <item>
      <title>Similarities between Stored Procedures and Python Functions</title>
      <dc:creator>Roy Shavi Kinyua</dc:creator>
      <pubDate>Thu, 06 Nov 2025 21:25:40 +0000</pubDate>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641/similarities-between-stored-procedures-and-python-functions-c5e</link>
      <guid>https://dev.to/roy_b5001e0ff9a27dea39641/similarities-between-stored-procedures-and-python-functions-c5e</guid>
      <description>&lt;p&gt;Despite operating in different environments, stored procedures and python functions have several fundamentals similarities in their design and purpose.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Encapsulation of logic: Both can encapsulate a set of instructions or a specific logical unit into a named, reusable entity. This promotes code organization and readability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reusability: Once defined, both can be called multiple times from different parts of an application or database, eliminating the need to repeat code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parametalization: Both accept input parameters to allow for flexible execution wiht varying data, making them aaptable to different scenarios wihtout modifying their logic.&lt;br&gt;
STORED PROCEDURE:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzr0dgacfewfnhktum15n.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzr0dgacfewfnhktum15n.JPG" alt=" " width="556" height="188"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PYTHON FUNCTION:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Control Flow: Both support control flow constructs like conditional statements (e.g., IF/ELSE in SQL, if/else in Python) and looping mechanisms (e.g., WHILE in SQL, while or for in Python) to manage the execution path based on specific conditions.&lt;/li&gt;
&lt;li&gt;Modularity: They both break down complex tasks into smaller, manageable, and independent units, which simplifies development, testing, and maintenance.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17uya72oyub7t932wzs8.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17uya72oyub7t932wzs8.JPG" alt=" " width="469" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Parametric and Non-Parametric tests</title>
      <dc:creator>Roy Shavi Kinyua</dc:creator>
      <pubDate>Thu, 09 Oct 2025 15:18:11 +0000</pubDate>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641/parametric-and-non-parametric-tests-c40</link>
      <guid>https://dev.to/roy_b5001e0ff9a27dea39641/parametric-and-non-parametric-tests-c40</guid>
      <description>&lt;h2&gt;
  
  
  Key differences
&lt;/h2&gt;

&lt;p&gt;The key difference between parametric and nonparametric tests is that the parametric test assumes data follows a specific distribution, like the normal distribution and relies on population parameters such as mean and variance. Whereas nonparametric tests do not depend on any distribution. Non-parametric does not make any assumptions and measures the central tendency with the median value. It is also used for non-normally distributed data or small sample data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Definition of Parametric and Non-parametric data
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Parametric Test Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Statistics, a parametric test is a kind of hypothesis test which gives generalizations for generating records regarding the mean of the primary/original population. The t-test is carried out based on the students’ t-statistic, which is often used in that value.&lt;/p&gt;

&lt;p&gt;The t-statistic test holds on the underlying hypothesis, which includes the normal distribution of a variable. In this case, the mean is known, or it is considered to be known. For finding the sample from the population, population variance is identified. It is hypothesized that the variables of concern in the population are estimated on an interval scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non-Parametric Test Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The non-parametric test does not require any population distribution, which is meant by distinct parameters. It is also a kind of hypothesis test, which is not based on the underlying hypothesis. In the case of the non-parametric test, the test is based on the differences in the median. So this kind of test is also called a distribution-free test. The test variables are determined on the nominal or ordinal level. If the independent variables are non-metric, the non-parametric test is usually performed.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>datascience</category>
      <category>science</category>
    </item>
    <item>
      <title>Degrees of Freedom and it's importance in statistical analysis</title>
      <dc:creator>Roy Shavi Kinyua</dc:creator>
      <pubDate>Wed, 08 Oct 2025 15:00:40 +0000</pubDate>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641/degrees-of-freedom-and-its-importance-in-statistical-analysis-4gmk</link>
      <guid>https://dev.to/roy_b5001e0ff9a27dea39641/degrees-of-freedom-and-its-importance-in-statistical-analysis-4gmk</guid>
      <description>&lt;p&gt;Degrees of freedom are the number of independent variables that can be estimated in a statistical analysis and tell you how many items can be estimated. It is denoted by n, which is the sample size minus one. It is a combination of how much data you have and how many parameters you can estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Degrees of freedom for t-Tests
&lt;/h2&gt;

&lt;p&gt;T-tests are hypothesis tests for the mean and use the t-distribution to determine significance. The degrees of freedom define the shape of the distribution that your t-tests use to calculate the p-value. The p-value is the probability of your data occurring under the null hypothesis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance of Degrees of Freedom
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Cutoff values: In inferential statistical tests, having an understanding of DOF can help to determine critical cutoff values.&lt;/li&gt;
&lt;li&gt;Rejection of false hypothesis: More often than not, higher DOF realte to larger sample size. A higher ssample size allows for more power to reject a false hypothesis and determine a significant result.&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Empirical Rule of Distribution</title>
      <dc:creator>Roy Shavi Kinyua</dc:creator>
      <pubDate>Wed, 01 Oct 2025 21:30:31 +0000</pubDate>
      <link>https://dev.to/roy_b5001e0ff9a27dea39641/empirical-rule-of-distribution-5c57</link>
      <guid>https://dev.to/roy_b5001e0ff9a27dea39641/empirical-rule-of-distribution-5c57</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is the Empirical Rule?&lt;/strong&gt;&lt;br&gt;
The empirical rule of distribution, which can also be called the 3 sigma rule or 68-95-99.7 predicts deviations from the mean of the data. It indicates that 68% of observations fall within the first standard deviation in normal distributions, 95% are within the second standard deviation, and 99.7% are within the third standard deviation. The rule is a vital component in quality control and risk analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the Empirical Rule&lt;/strong&gt;&lt;br&gt;
The empirical rule is often used in statistics for forecasting. This rule can be used as a rough estimate of the outcome of the impending data to be collected and analyzed. It can be used as an evaluation technique since collecting the appropriate data can be time-consuming and even impossible in some cases. It is also used a rough way to test a distributions "normality". &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
