This function is strange. Looks like the implementation is of low quality.

```
bool isDeterministic() const override { return false; }
bool isDeterministicInScopeOfQuery() const override { return false; }
```
Why it is not deterministic? Missing a comment.

```
String convertToJson(const PODArray<String> & variant_names, const Variants & variants)
{
    FormatSettings settings;

    WriteBufferFromOwnString buf;

    writeCString("{\"data\":[", buf);
    for (size_t i = 0; i < variants.size(); ++i)
    {
        writeCString("{\"variant_name\":", buf);
        writeJSONString(variant_names[i], buf, settings);
        writeCString(",\"x\":", buf);
        writeText(variants[i].x, buf);
        writeCString(",\"y\":", buf);
        writeText(variants[i].y, buf);
        writeCString(",\"beats_control\":", buf);
        writeText(variants[i].beats_control, buf);
        writeCString(",\"to_be_best\":", buf);
        writeText(variants[i].best, buf);
        writeCString("}", buf);
        if (i != variant_names.size() -1)
            writeCString(",", buf);
    }
    writeCString("]}", buf);

    return buf.str();
}
```
It returns unstructured data? :scream: 

As first step we can remove documentation for this function.
CC @nikitamikhaylov 
#include <Functions/abtesting.h>
#if !defined(ARCADIA_BUILD) && USE_STATS
#include <math.h>
#include <DataTypes/DataTypeString.h>
#include <Columns/ColumnString.h>
#include <Columns/ColumnConst.h>
#include <Columns/ColumnsNumber.h>
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionHelpers.h>
#include <IO/WriteHelpers.h>
#include <IO/WriteBufferFromString.h>
#define STATS_ENABLE_STDVEC_WRAPPERS
#include <stats.hpp>
namespace DB
{
namespace ErrorCodes
{
    extern const int ILLEGAL_TYPE_OF_ARGUMENT;
    extern const int BAD_ARGUMENTS;
}
static const String BETA = "beta";
static const String GAMMA = "gamma";
template <bool higher_is_better>
Variants bayesian_ab_test(String distribution, PODArray<Float64> & xs, PODArray<Float64> & ys)