Experimental design in statistics

This week I think I will be getting back into Statistics for a while. I am not sure if I truly want to get into this subject, but it would seem that I have at least some interest in it when it comes to playing around with various statistics when it comes to this website. Mainly when it comes to things like traffic, mean word count per post, organic traffic clicks per word, and so forth. However of course there are all kinds of other applications when it comes to statistics, so now and then I do a little more reading on the topic, and work out some code examples when it comes to a few things here and there.

In my travels on line I have come across a Wikipedia article on the topic of something called Experimental Design that struck a nerve when it comes certain things I find myself writing about such as the topic of pure functions. Which prompted me to look into some additional resources on the open web in an effort to gain at least a slightly better understanding of this general topic in statistics.

Whatever I call it something to this effect will come up sooner of later when it comes to starting to play around with a few things when it comes to statistics. One of the first things that is required when it comes to doing something with data is to first have, well, some data. It is best to have some kind of real data to work with, with that said when it comes to my website for example there is Google search console, and Google analytics that help provide some real data when it comes to traffic. In addition I have some of my own scripts that I can use when it comes to tabulating things like word count, mean word count over all, mean word count per category, and so forth.

However what if I want to come up with some kind of hypothesis ( or maybe I should just stick to the word guess sense I am not much of a scientist at this point ) as to the outcome of some kind of action? For example say I take a collection of content that is of very poor quality and invest a solid month of time writing new content while greatly improving the quality of the older content on top of it. Before I make such an investment of time I would like to try to find a way to know if there is a good chance that such an investment of time will end up being worth the effort. In that case I would want to make some kind of projection, based off of some real data, or failing that some kind of educated guess, or even a wild or random guess. This it would seem is where the topic of Experimental Design comes into play. It is a formal way of creating some kind of testable experiment where a research question is asked, and that research question is then tested then an outcome is reached.

However I am pretty new to all of this, so this will be more of an attempt at Experimental Design rather than a serious guide. Which is not always such a bad thing, if an informal approach to something still helps me make smarter choices then mission accomplished.

Read More

The statistics standard library in Python

A major part of python programing has to do with statistics, or at least it would seem that is the area of python where the language is used the most. So of course there is a built in library that has to do with statistics that has all the usual methods that I would expect in such a library that have to do with the basic stuff at least when it comes to an arithmetic average, median, and mode of a set of numbers. I use the term arithmetic average to refer to what many may regard as the normal average where the sum of numbers is divided over the number of numbers because there is more than one average method in this library.

Read More

The JSON standard library in Python

I have wrote a few posts on standard libraries in python thus far, I do not think I will write posts on all of them, however I still think I should write a post for each of them that I might actually use in projects. One such library might very well be the JSON standard library. The JSON standard library is the standard library to use when it comes to creating a JSON string from a source object, and to parse a JSON string into workable objects. The JSON format is an example of a data serialization language, that is taking an object and turning it into a string format that can be stored in a file, or transmitted over and http request to or from a client system.

If you have some experience with javaScript there is the JSON.parse, and JSON.strigify methods that can be used to do the same in a javaScript environment. I wrote a post centered on the javaScript Json parse method before hand, and it is a javaScript rather than python related topic so I will not be getting into detail with that here.

So I am sure that I will want to use the json library at least once or twice here and there of I start to work on some real projects with python, so I should take a moment to work out at least a few basic examples of the json library for the sake of just getting the hang of it,

Read More

Python Basic Dice example

I would like to start off a few posts on some basic, and maybe a few not so basic python applaction examples. Just for the sake of learning how to progress beyond just picking up the basics when it comes to the langue itself, and the standard libries. After all the long term plan of picking up a langue should be to create some actual projects of one kind or another.

I think at least a few posts should be on very basic single file programes that just do one little thing. This is becuase I would like to have a few very simple getting started type posts where the goal is to make something that is a finished product rather than just soemthing that helps with one little problem. However I also think that often that should be the goal anyway when it comes to making a python applaction. Often I might think of an applaction as just one product, but often one product can be just a whole bunch of products that work togetaher.

So to start off this collection of python example posts I think I will start off with a simple dice applaction. That is just a way to spit out one or more numbers to the standard output between and including 1 and 6. However there is still more to it than just that even when it comes to such a simple getting started project. I would like to be able to use the script as bolth a module that I can use in other pythin scripts, and stand alone project by itself. There are also at least a few additional options that I can add to the project such as being able to set the number of sides for a set of dice, or just one dice in a set of dice. There is also being able to have control over how the output is formated, such has having some kind of plain text format, or spit out some JSON. So maybe this example will not be so basic, but still I will try to keep from going to nuts with this one becuase I would like to make this one of my getting startd with python type posts.

Read More

The textwrap standard library in python

I think that I am going to want to write at least a few more posts on the collection of standard libraries that are built into python itself so I do not waste time working out my own solutions for things that can be set and done in a flash with some feature that is built into python itself. One thing that I need to do now and then is break a string into a collection of lists where each element in the list is a substring of the original source text that is no more than a certain set character length long. In other words I often need a way to wrap text which is a common feature in most text editors, or any project that might involve a fair amount of text that needs to be displayed. I often work out my own quick solutions for this, but there is a built in library called textwrap for this one that helps to make get this part of programing out of the way yet even faster.

So in this post I will be going over a few quick examples of the textwrap standard library in python, just for the sake of going over some of the basic features. In the process of doing so I might touch base on some other related topics that have to do with lists, strings, and other libraries that can be used to create quick simple python projects. There is only so much to write about when it comes to this library by itself but when it comes to using it with other libraries and features of python thats where there is always room for more.

Read More